Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'usb-serial-4.9-rc2' of git://git.kernel.org/pub/scm/linux/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>

+10 -5
+3 -1
drivers/usb/serial/cp210x.c
··· 1077 1077 u8 control; 1078 1078 int result; 1079 1079 1080 - cp210x_read_u8_reg(port, CP210X_GET_MDMSTS, &control); 1080 + result = cp210x_read_u8_reg(port, CP210X_GET_MDMSTS, &control); 1081 + if (result) 1082 + return result; 1081 1083 1082 1084 result = ((control & CONTROL_DTR) ? TIOCM_DTR : 0) 1083 1085 |((control & CONTROL_RTS) ? TIOCM_RTS : 0)
+2 -1
drivers/usb/serial/ftdi_sio.c
··· 986 986 /* ekey Devices */ 987 987 { USB_DEVICE(FTDI_VID, FTDI_EKEY_CONV_USB_PID) }, 988 988 /* Infineon Devices */ 989 - { USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_PID, 1) }, 989 + { USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_TC1798_PID, 1) }, 990 + { USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_TC2X7_PID, 1) }, 990 991 /* GE Healthcare devices */ 991 992 { USB_DEVICE(GE_HEALTHCARE_VID, GE_HEALTHCARE_NEMO_TRACKER_PID) }, 992 993 /* Active Research (Actisense) devices */
+3 -2
drivers/usb/serial/ftdi_sio_ids.h
··· 626 626 /* 627 627 * Infineon Technologies 628 628 */ 629 - #define INFINEON_VID 0x058b 630 - #define INFINEON_TRIBOARD_PID 0x0028 /* DAS JTAG TriBoard TC1798 V1.0 */ 629 + #define INFINEON_VID 0x058b 630 + #define INFINEON_TRIBOARD_TC1798_PID 0x0028 /* DAS JTAG TriBoard TC1798 V1.0 */ 631 + #define INFINEON_TRIBOARD_TC2X7_PID 0x0043 /* DAS JTAG TriBoard TC2X7 V1.0 */ 631 632 632 633 /* 633 634 * Acton Research Corp.
+2 -1
drivers/usb/serial/usb-serial.c
··· 1078 1078 1079 1079 serial->disconnected = 0; 1080 1080 1081 - usb_serial_console_init(serial->port[0]->minor); 1081 + if (num_ports > 0) 1082 + usb_serial_console_init(serial->port[0]->minor); 1082 1083 exit: 1083 1084 module_put(type->driver.owner); 1084 1085 return 0;