1. 04 1月, 2017 5 次提交
    • J
      USB: serial: io_ti: fix another NULL-deref at open · 4f9785cc
      Johan Hovold 提交于
      In case a device is left in "boot-mode" we must not register any port
      devices in order to avoid a NULL-pointer dereference on open due to
      missing endpoints. This could be used by a malicious device to trigger
      an OOPS:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000030
      ...
      [<bf0caa84>] (edge_open [io_ti]) from [<bf0b0118>] (serial_port_activate+0x68/0x98 [usbserial])
      [<bf0b0118>] (serial_port_activate [usbserial]) from [<c0470ca4>] (tty_port_open+0x9c/0xe8)
      [<c0470ca4>] (tty_port_open) from [<bf0b0da0>] (serial_open+0x48/0x6c [usbserial])
      [<bf0b0da0>] (serial_open [usbserial]) from [<c0469178>] (tty_open+0xcc/0x5cc)
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      4f9785cc
    • J
      USB: serial: io_ti: fix NULL-deref at open · a323fefc
      Johan Hovold 提交于
      Fix NULL-pointer dereference when clearing halt at open should a
      malicious device lack the expected endpoints when in download mode.
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000030
      ...
      [<bf011ed8>] (edge_open [io_ti]) from [<bf000118>] (serial_port_activate+0x68/0x98 [usbserial])
      [<bf000118>] (serial_port_activate [usbserial]) from [<c0470ca4>] (tty_port_open+0x9c/0xe8)
      [<c0470ca4>] (tty_port_open) from [<bf000da0>] (serial_open+0x48/0x6c [usbserial])
      [<bf000da0>] (serial_open [usbserial]) from [<c0469178>] (tty_open+0xcc/0x5cc)
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      a323fefc
    • J
      USB: serial: io_edgeport: fix NULL-deref at open · 0dd40842
      Johan Hovold 提交于
      Fix NULL-pointer dereference when initialising URBs at open should a
      non-EPIC device lack a bulk-in or interrupt-in endpoint.
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000028
      ...
      PC is at edge_open+0x24c/0x3e8 [io_edgeport]
      
      Note that the EPIC-device probe path has the required sanity checks so
      this makes those checks partially redundant.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      0dd40842
    • J
      USB: serial: garmin_gps: fix memory leak on failed URB submit · c4ac4496
      Johan Hovold 提交于
      Make sure to free the URB transfer buffer in case submission fails (e.g.
      due to a disconnect).
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      c4ac4496
    • J
      USB: serial: cyberjack: fix NULL-deref at open · 3dca0111
      Johan Hovold 提交于
      Fix NULL-pointer dereference when clearing halt at open should the device
      lack a bulk-out endpoint.
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000030
      ...
      PC is at cyberjack_open+0x40/0x9c [cyberjack]
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      3dca0111
  2. 02 1月, 2017 1 次提交
    • G
      USB: serial: f81534: detect errors from f81534_logic_to_phy_port() · 42715763
      Geert Uytterhoeven 提交于
      With gcc 4.1.2:
      
          drivers/usb/serial/f81534.c: In function ‘f81534_port_probe’:
          drivers/usb/serial/f81534.c:1250: warning: comparison is always false due to limited range of data type
      
      f81534_logic_to_phy_port() may return a negative error value, which is
      ignored by assigning it to u8 f81534_port_private.phy_num.
      
      Use an intermediate variable of type int to fix this.
      While at it, forward the actual error code instead of converting it to
      -ENODEV, and drop the useless check for F81534_NUM_PORT, as the callee
      always returns a valid port number in case of success.
      
      Fixes: 0c9bd600 ("USB: serial: add Fintek F81532/534 driver")
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      42715763
  3. 09 12月, 2016 2 次提交
  4. 30 11月, 2016 2 次提交
  5. 29 11月, 2016 1 次提交
  6. 21 11月, 2016 1 次提交
  7. 17 11月, 2016 1 次提交
  8. 12 11月, 2016 1 次提交
  9. 07 11月, 2016 1 次提交
  10. 24 10月, 2016 8 次提交
  11. 21 10月, 2016 1 次提交
    • J
      USB: serial: fix potential NULL-dereference at probe · 126d26f6
      Johan Hovold 提交于
      Make sure we have at least one port before attempting to register a
      console.
      
      Currently, at least one driver binds to a "dummy" interface and requests
      zero ports for it. Should such an interface also lack endpoints, we get
      a NULL-deref during probe.
      
      Fixes: e5b1e206 ("USB: serial: make minor allocation dynamic")
      Cc: stable <stable@vger.kernel.org>	# 3.11
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      126d26f6
  12. 20 10月, 2016 1 次提交
  13. 17 10月, 2016 1 次提交
  14. 27 9月, 2016 1 次提交
  15. 12 9月, 2016 1 次提交
  16. 24 8月, 2016 1 次提交
  17. 23 8月, 2016 5 次提交
  18. 22 8月, 2016 1 次提交
  19. 20 8月, 2016 1 次提交
    • A
      USB: serial: option: add WeTelecom WM-D200 · 6695593e
      Aleksandr Makarov 提交于
      Add support for WeTelecom WM-D200.
      
      T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
      D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=22de ProdID=6801 Rev=00.00
      S:  Manufacturer=WeTelecom Incorporated
      S:  Product=WeTelecom Mobile Products
      C:  #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA
      I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      I:  If#= 3 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
      Signed-off-by: NAleksandr Makarov <aleksandr.o.makarov@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      6695593e
  20. 15 8月, 2016 2 次提交
  21. 08 8月, 2016 2 次提交