diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-28 11:32:42 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-28 11:32:42 -0500 |
commit | a89a798a010e8fef66d1a85fa8b1f021304c7246 (patch) | |
tree | 14d17dd87b1b9353c8353830eff498fd8c51f8fd | |
parent | d8f00cd685f5c8e0def8593e520a7fef12c22407 (diff) | |
parent | 4152b387da81617c80cb2946b2d56e3958906b3e (diff) |
Merge tag 'usb-serial-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes:
USB-serial fixes for v4.5-rc2
Here are two fixes of crashes in the visor driver that could be
triggered using bad (malicious) descriptors, a fix for two memory leaks
in the new mxu11x0 driver, and an interface-blacklist fix for the option
driver.
Included are also some new device ids.
Signed-off-by: Johan Hovold <johan@kernel.org>
-rw-r--r-- | drivers/usb/serial/cp210x.c | 1 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 1 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio_ids.h | 1 | ||||
-rw-r--r-- | drivers/usb/serial/mxu11x0.c | 20 | ||||
-rw-r--r-- | drivers/usb/serial/option.c | 18 | ||||
-rw-r--r-- | drivers/usb/serial/visor.c | 11 |
6 files changed, 49 insertions, 3 deletions
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 9b90ad747d87..987813b8a7f9 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
@@ -99,6 +99,7 @@ static const struct usb_device_id id_table[] = { | |||
99 | { USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */ | 99 | { USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */ |
100 | { USB_DEVICE(0x10C4, 0x81AD) }, /* INSYS USB Modem */ | 100 | { USB_DEVICE(0x10C4, 0x81AD) }, /* INSYS USB Modem */ |
101 | { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */ | 101 | { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */ |
102 | { USB_DEVICE(0x10C4, 0x81D7) }, /* IAI Corp. RCB-CV-USB USB to RS485 Adaptor */ | ||
102 | { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */ | 103 | { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */ |
103 | { USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */ | 104 | { USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */ |
104 | { USB_DEVICE(0x10C4, 0x81E8) }, /* Zephyr Bioharness */ | 105 | { USB_DEVICE(0x10C4, 0x81E8) }, /* Zephyr Bioharness */ |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index a5a0376bbd48..8c660ae401d8 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -824,6 +824,7 @@ static const struct usb_device_id id_table_combined[] = { | |||
824 | { USB_DEVICE(FTDI_VID, FTDI_TURTELIZER_PID), | 824 | { USB_DEVICE(FTDI_VID, FTDI_TURTELIZER_PID), |
825 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 825 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
826 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, | 826 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, |
827 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_SCU18) }, | ||
827 | { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, | 828 | { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, |
828 | 829 | ||
829 | /* Papouch devices based on FTDI chip */ | 830 | /* Papouch devices based on FTDI chip */ |
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index 67c6d4469730..a84df2513994 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h | |||
@@ -615,6 +615,7 @@ | |||
615 | */ | 615 | */ |
616 | #define RATOC_VENDOR_ID 0x0584 | 616 | #define RATOC_VENDOR_ID 0x0584 |
617 | #define RATOC_PRODUCT_ID_USB60F 0xb020 | 617 | #define RATOC_PRODUCT_ID_USB60F 0xb020 |
618 | #define RATOC_PRODUCT_ID_SCU18 0xb03a | ||
618 | 619 | ||
619 | /* | 620 | /* |
620 | * Infineon Technologies | 621 | * Infineon Technologies |
diff --git a/drivers/usb/serial/mxu11x0.c b/drivers/usb/serial/mxu11x0.c index e3c3f57c2d82..619607323bfd 100644 --- a/drivers/usb/serial/mxu11x0.c +++ b/drivers/usb/serial/mxu11x0.c | |||
@@ -368,6 +368,16 @@ static int mxu1_port_probe(struct usb_serial_port *port) | |||
368 | return 0; | 368 | return 0; |
369 | } | 369 | } |
370 | 370 | ||
371 | static int mxu1_port_remove(struct usb_serial_port *port) | ||
372 | { | ||
373 | struct mxu1_port *mxport; | ||
374 | |||
375 | mxport = usb_get_serial_port_data(port); | ||
376 | kfree(mxport); | ||
377 | |||
378 | return 0; | ||
379 | } | ||
380 | |||
371 | static int mxu1_startup(struct usb_serial *serial) | 381 | static int mxu1_startup(struct usb_serial *serial) |
372 | { | 382 | { |
373 | struct mxu1_device *mxdev; | 383 | struct mxu1_device *mxdev; |
@@ -427,6 +437,14 @@ err_free_mxdev: | |||
427 | return err; | 437 | return err; |
428 | } | 438 | } |
429 | 439 | ||
440 | static void mxu1_release(struct usb_serial *serial) | ||
441 | { | ||
442 | struct mxu1_device *mxdev; | ||
443 | |||
444 | mxdev = usb_get_serial_data(serial); | ||
445 | kfree(mxdev); | ||
446 | } | ||
447 | |||
430 | static int mxu1_write_byte(struct usb_serial_port *port, u32 addr, | 448 | static int mxu1_write_byte(struct usb_serial_port *port, u32 addr, |
431 | u8 mask, u8 byte) | 449 | u8 mask, u8 byte) |
432 | { | 450 | { |
@@ -957,7 +975,9 @@ static struct usb_serial_driver mxu11x0_device = { | |||
957 | .id_table = mxu1_idtable, | 975 | .id_table = mxu1_idtable, |
958 | .num_ports = 1, | 976 | .num_ports = 1, |
959 | .port_probe = mxu1_port_probe, | 977 | .port_probe = mxu1_port_probe, |
978 | .port_remove = mxu1_port_remove, | ||
960 | .attach = mxu1_startup, | 979 | .attach = mxu1_startup, |
980 | .release = mxu1_release, | ||
961 | .open = mxu1_open, | 981 | .open = mxu1_open, |
962 | .close = mxu1_close, | 982 | .close = mxu1_close, |
963 | .ioctl = mxu1_ioctl, | 983 | .ioctl = mxu1_ioctl, |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index f2280606b73c..db86e512e0fc 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -268,6 +268,8 @@ static void option_instat_callback(struct urb *urb); | |||
268 | #define TELIT_PRODUCT_CC864_SINGLE 0x1006 | 268 | #define TELIT_PRODUCT_CC864_SINGLE 0x1006 |
269 | #define TELIT_PRODUCT_DE910_DUAL 0x1010 | 269 | #define TELIT_PRODUCT_DE910_DUAL 0x1010 |
270 | #define TELIT_PRODUCT_UE910_V2 0x1012 | 270 | #define TELIT_PRODUCT_UE910_V2 0x1012 |
271 | #define TELIT_PRODUCT_LE922_USBCFG0 0x1042 | ||
272 | #define TELIT_PRODUCT_LE922_USBCFG3 0x1043 | ||
271 | #define TELIT_PRODUCT_LE920 0x1200 | 273 | #define TELIT_PRODUCT_LE920 0x1200 |
272 | #define TELIT_PRODUCT_LE910 0x1201 | 274 | #define TELIT_PRODUCT_LE910 0x1201 |
273 | 275 | ||
@@ -615,6 +617,16 @@ static const struct option_blacklist_info telit_le920_blacklist = { | |||
615 | .reserved = BIT(1) | BIT(5), | 617 | .reserved = BIT(1) | BIT(5), |
616 | }; | 618 | }; |
617 | 619 | ||
620 | static const struct option_blacklist_info telit_le922_blacklist_usbcfg0 = { | ||
621 | .sendsetup = BIT(2), | ||
622 | .reserved = BIT(0) | BIT(1) | BIT(3), | ||
623 | }; | ||
624 | |||
625 | static const struct option_blacklist_info telit_le922_blacklist_usbcfg3 = { | ||
626 | .sendsetup = BIT(0), | ||
627 | .reserved = BIT(1) | BIT(2) | BIT(3), | ||
628 | }; | ||
629 | |||
618 | static const struct usb_device_id option_ids[] = { | 630 | static const struct usb_device_id option_ids[] = { |
619 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, | 631 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, |
620 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, | 632 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, |
@@ -1160,6 +1172,10 @@ static const struct usb_device_id option_ids[] = { | |||
1160 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) }, | 1172 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) }, |
1161 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) }, | 1173 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) }, |
1162 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UE910_V2) }, | 1174 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UE910_V2) }, |
1175 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG0), | ||
1176 | .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg0 }, | ||
1177 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG3), | ||
1178 | .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 }, | ||
1163 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910), | 1179 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910), |
1164 | .driver_info = (kernel_ulong_t)&telit_le910_blacklist }, | 1180 | .driver_info = (kernel_ulong_t)&telit_le910_blacklist }, |
1165 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920), | 1181 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920), |
@@ -1679,7 +1695,7 @@ static const struct usb_device_id option_ids[] = { | |||
1679 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_P) }, | 1695 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_P) }, |
1680 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8), | 1696 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8), |
1681 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 1697 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
1682 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX) }, | 1698 | { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX, 0xff) }, |
1683 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PLXX), | 1699 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PLXX), |
1684 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 1700 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
1685 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, | 1701 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, |
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index 60afb39eb73c..337a0be89fcf 100644 --- a/drivers/usb/serial/visor.c +++ b/drivers/usb/serial/visor.c | |||
@@ -544,6 +544,11 @@ static int treo_attach(struct usb_serial *serial) | |||
544 | (serial->num_interrupt_in == 0)) | 544 | (serial->num_interrupt_in == 0)) |
545 | return 0; | 545 | return 0; |
546 | 546 | ||
547 | if (serial->num_bulk_in < 2 || serial->num_interrupt_in < 2) { | ||
548 | dev_err(&serial->interface->dev, "missing endpoints\n"); | ||
549 | return -ENODEV; | ||
550 | } | ||
551 | |||
547 | /* | 552 | /* |
548 | * It appears that Treos and Kyoceras want to use the | 553 | * It appears that Treos and Kyoceras want to use the |
549 | * 1st bulk in endpoint to communicate with the 2nd bulk out endpoint, | 554 | * 1st bulk in endpoint to communicate with the 2nd bulk out endpoint, |
@@ -597,8 +602,10 @@ static int clie_5_attach(struct usb_serial *serial) | |||
597 | */ | 602 | */ |
598 | 603 | ||
599 | /* some sanity check */ | 604 | /* some sanity check */ |
600 | if (serial->num_ports < 2) | 605 | if (serial->num_bulk_out < 2) { |
601 | return -1; | 606 | dev_err(&serial->interface->dev, "missing bulk out endpoints\n"); |
607 | return -ENODEV; | ||
608 | } | ||
602 | 609 | ||
603 | /* port 0 now uses the modified endpoint Address */ | 610 | /* port 0 now uses the modified endpoint Address */ |
604 | port = serial->port[0]; | 611 | port = serial->port[0]; |