Skip to content

Commit

Permalink
Merge tag 'usb-serial-4.9-rc2' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/johan/usb-serial into usb-linus

Johan writes:

USB-serial fixes for v4.9-rc2

Here's a fix for a NULL-deref during probe which could be triggered by a
malicious device, and a fix for some missing error handling in cp210x
that also leaked some bits from the stack. Included is also a new device
id for ftdi_sio.

Signed-off-by: Johan Hovold <johan@kernel.org>
  • Loading branch information
Greg Kroah-Hartman committed Oct 22, 2016
2 parents 7d3b016 + 126d26f commit 36de70e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion drivers/usb/serial/cp210x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,9 @@ static int cp210x_tiocmget(struct tty_struct *tty)
u8 control;
int result;

cp210x_read_u8_reg(port, CP210X_GET_MDMSTS, &control);
result = cp210x_read_u8_reg(port, CP210X_GET_MDMSTS, &control);
if (result)
return result;

result = ((control & CONTROL_DTR) ? TIOCM_DTR : 0)
|((control & CONTROL_RTS) ? TIOCM_RTS : 0)
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,8 @@ static const struct usb_device_id id_table_combined[] = {
/* ekey Devices */
{ USB_DEVICE(FTDI_VID, FTDI_EKEY_CONV_USB_PID) },
/* Infineon Devices */
{ USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_PID, 1) },
{ USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_TC1798_PID, 1) },
{ USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_TC2X7_PID, 1) },
/* GE Healthcare devices */
{ USB_DEVICE(GE_HEALTHCARE_VID, GE_HEALTHCARE_NEMO_TRACKER_PID) },
/* Active Research (Actisense) devices */
Expand Down
5 changes: 3 additions & 2 deletions drivers/usb/serial/ftdi_sio_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,9 @@
/*
* Infineon Technologies
*/
#define INFINEON_VID 0x058b
#define INFINEON_TRIBOARD_PID 0x0028 /* DAS JTAG TriBoard TC1798 V1.0 */
#define INFINEON_VID 0x058b
#define INFINEON_TRIBOARD_TC1798_PID 0x0028 /* DAS JTAG TriBoard TC1798 V1.0 */
#define INFINEON_TRIBOARD_TC2X7_PID 0x0043 /* DAS JTAG TriBoard TC2X7 V1.0 */

/*
* Acton Research Corp.
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,8 @@ static int usb_serial_probe(struct usb_interface *interface,

serial->disconnected = 0;

usb_serial_console_init(serial->port[0]->minor);
if (num_ports > 0)
usb_serial_console_init(serial->port[0]->minor);
exit:
module_put(type->driver.owner);
return 0;
Expand Down

0 comments on commit 36de70e

Please sign in to comment.