Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionRalf Spenneberg
2015-11-18 20:12:00 UTC
Description of problem:
Local RedHat Enterprise Linux DoS – RHEL 7.1 Kernel crashes on invalid
USB device descriptors (mct_u232 driver) [local-DoS]
Version-Release number of selected component (if applicable):
Kernel-Version: 3.10.0-229.20.1.el7.x86_64
How reproducible:
always
OpenSource Security Ralf Spenneberg
Am Bahnhof 3-5
48565 Steinfurt
info
Date: November 12th, 2015
Authors: Sergej Schumilo, Hendrik Schwartke, Ralf Spenneberg
CVE: not yet assigned
CVSS: 4.9 (AV:L/AC:L/Au:N/C:N/I:N/A:C)
Title: Local RedHat Enterprise Linux DoS – RHEL 7.1 Kernel crashes on invalid
USB device descriptors (mct_u232 driver) [local-DoS]
Severity: Critical. The Kernel panics. A reboot is required.
Ease of Exploitation: Trivial
Vulnerability type: Wrong input validation
Products: RHEL 7.1 including all updates
Kernel-Version: 3.10.0-229.20.1.el7.x86_64
(for debugging-purposes we used the CentOS Kernel kernel-debuginfo-3.10.0-229.14.1.el7)
Abstract
The Kernel 3.10.0-229.20.1.el7.x86_64 crashes when presented a buggy USB
device which requires the mct_u232 driver.
Detailed product description
We confirmed the bug on the following system:
RHEL 7.1
Kernel = 3.10.0-229.20.1.el7.x86_64
Further products or kernel versions have not been tested.
How reproducible: Always
Actual results: Kernel crashes
Description:
The bug was found using the USB-fuzzing framework vUSBf from Sergej Schumilo
(github.com/schumilo) using the following device descriptor:
######### PAYLOAD 1 #########
[*] Device-Descriptor
bLength: 0x12
bDescriptorType: 0x1
bcdUSB: 0x200
bDeviceClass: 0x3
bDeviceSubClass: 0x0
bDeviceProtocol: 0x0
bMaxPacketSize: 0x40
idVendor: 0x50d
idProduct: 0x109
bcdDevice: 0x100
iManufacturer: 0x1
iProduct: 0x2
iSerialNumbers: 0x3
bNumConfigurations: 0x1
This is the configuration descriptor containing only one interrupt-endpoint-descriptor (IN-direction).
The mct_u232 driver assumes that there will be at least two endpoint-descriptors configured as interrupt-in.
Since there is no sanity check, it is possible that the kernel tries to dereference a null-pointer.
This results in a crash of the system.
****
$ nm mct_u232.ko.debug | grep mct_u232_port_probe
0000000000000fc0 t mct_u232_port_probe
$ addr2line -e mct_u232.ko.debug 0xFF9
/usr/src/debug/kernel-3.10.0-229.14.1.el7/linux-3.10.0-229.14.1.el7.x86_64/drivers/usb/serial/mct_u232.c:386
****
**** CentOS-Kernel linux-3.10.0-229.14.1.el7 (drivers/usb/serial/mct_u232.c)
...
377 static int mct_u232_port_probe(struct usb_serial_port *port)
378 {
379 struct mct_u232_private *priv;
380
381 priv = kzalloc(sizeof(*priv), GFP_KERNEL);
382 if (!priv)
383 return -ENOMEM;
384
385 /* Use second interrupt-in endpoint for reading. */
386 priv->read_urb = port->serial->port[1]->interrupt_in_urb; /* missing sanity check -> possible null-pointer dereference */
387 priv->read_urb->context = port;
388
389 spin_lock_init(&priv->lock);
390
391 usb_set_serial_port_data(port, priv);
392
393 return 0;
395 }
...
****
[*] Configuration-Descriptor
bLength: 0x9
bDescriptorType: 0x2
wTotalLength: 0x27
bNumInterfaces: 0x1
bConfigurationValue: 0x1
iConfiguration: 0x0
bmAttributes: 0x0
bMaxPower: 0x31
[*] Interface-Descriptor
bLength: 0x9
bDescriptorType: 0x4
bInterfaceNumber: 0x0
bAlternateSetting: 0x0
bNumEndpoints: 0x3
bInterfaceClass: 0x0
bInterfaceSubClass: 0x0
bInterfaceProtocol: 0x0
[*] Endpoint-Descriptor
bLength: 0x7
bDescriptorType: 0x5
bEndpointAddress: 0x81 <-- IN-Direction
bmAttribut: 0x3 <-- Interrupt-Transfer
wMaxPacketSize: 0x404
bInterval: 0xc
[*] Endpoint-Descriptor
bLength: 0x7
bDescriptorType: 0x5
bEndpointAddress: 0x1 <-- OUT-Direction
bmAttribut: 0x2 <-- Bulk-Transfer
wMaxPacketSize: 0x4
bInterval: 0xc
[*] Endpoint-Descriptor
bLength: 0x7
bDescriptorType: 0x5
bEndpointAddress: 0x82 <-- IN-Direction
bmAttribut: 0x1 <-- Bulk-Transfer
wMaxPacketSize: 0x4
bInterval: 0xc
Proof of Concept:
1) The bug can be reproduced using USB-fuzzing framework vUSBf from Sergej Schumilo (github.com/schumilo).
The attached vUSBf-obj file contains the payload. Please let us know if you would like to use the Facedancer board.
In such case, we could also provide a patched version of vUSBf which allows to reproduce vUSBf-Payloads using the Facedancer board.
2) For a proof of concept we are providing also an Arduino firmware file. Just flash it
on Arduino Leonardo and plug it into any RHEL machine. The Arduino will
emulate the defective USB device.
avrdude -v -p ATMEGA32u4 -c avr109 -P /dev/ttyACM0 -b 57600 -U flash:w:binary.hex
The file binary.hex has been attached to this bug report.
To prevent automated sending of payloads, use a jumper to connect port D3 and
5V!
Severity and Ease of Exploitation
The security weakness can be easily exploited. Using our Arduino firmware only
physical access to the system is required.
Additional info:
Stacktrace, vUSBf-Payload, Arduino-Firmware attached.
Please assign a CVE for this issue since this is a local DoS of the targeted system.
CVSS 4.9 (AV:L/AC:L/Au:N/C:N/I:N/A:C)
Thank you for reporting this flaw. The Product Security has rated this flaw as having low security impact (bz#1317007), so the patch is currently not planned to be added to the RHEL source trees. If accepted in the upstream, the patch may get to the RHEL trees later at the next USB subsystem code rebase.
Description of problem: Local RedHat Enterprise Linux DoS – RHEL 7.1 Kernel crashes on invalid USB device descriptors (mct_u232 driver) [local-DoS] Version-Release number of selected component (if applicable): Kernel-Version: 3.10.0-229.20.1.el7.x86_64 How reproducible: always OpenSource Security Ralf Spenneberg Am Bahnhof 3-5 48565 Steinfurt info Date: November 12th, 2015 Authors: Sergej Schumilo, Hendrik Schwartke, Ralf Spenneberg CVE: not yet assigned CVSS: 4.9 (AV:L/AC:L/Au:N/C:N/I:N/A:C) Title: Local RedHat Enterprise Linux DoS – RHEL 7.1 Kernel crashes on invalid USB device descriptors (mct_u232 driver) [local-DoS] Severity: Critical. The Kernel panics. A reboot is required. Ease of Exploitation: Trivial Vulnerability type: Wrong input validation Products: RHEL 7.1 including all updates Kernel-Version: 3.10.0-229.20.1.el7.x86_64 (for debugging-purposes we used the CentOS Kernel kernel-debuginfo-3.10.0-229.14.1.el7) Abstract The Kernel 3.10.0-229.20.1.el7.x86_64 crashes when presented a buggy USB device which requires the mct_u232 driver. Detailed product description We confirmed the bug on the following system: RHEL 7.1 Kernel = 3.10.0-229.20.1.el7.x86_64 Further products or kernel versions have not been tested. How reproducible: Always Actual results: Kernel crashes Description: The bug was found using the USB-fuzzing framework vUSBf from Sergej Schumilo (github.com/schumilo) using the following device descriptor: ######### PAYLOAD 1 ######### [*] Device-Descriptor bLength: 0x12 bDescriptorType: 0x1 bcdUSB: 0x200 bDeviceClass: 0x3 bDeviceSubClass: 0x0 bDeviceProtocol: 0x0 bMaxPacketSize: 0x40 idVendor: 0x50d idProduct: 0x109 bcdDevice: 0x100 iManufacturer: 0x1 iProduct: 0x2 iSerialNumbers: 0x3 bNumConfigurations: 0x1 This is the configuration descriptor containing only one interrupt-endpoint-descriptor (IN-direction). The mct_u232 driver assumes that there will be at least two endpoint-descriptors configured as interrupt-in. Since there is no sanity check, it is possible that the kernel tries to dereference a null-pointer. This results in a crash of the system. **** $ nm mct_u232.ko.debug | grep mct_u232_port_probe 0000000000000fc0 t mct_u232_port_probe $ addr2line -e mct_u232.ko.debug 0xFF9 /usr/src/debug/kernel-3.10.0-229.14.1.el7/linux-3.10.0-229.14.1.el7.x86_64/drivers/usb/serial/mct_u232.c:386 **** **** CentOS-Kernel linux-3.10.0-229.14.1.el7 (drivers/usb/serial/mct_u232.c) ... 377 static int mct_u232_port_probe(struct usb_serial_port *port) 378 { 379 struct mct_u232_private *priv; 380 381 priv = kzalloc(sizeof(*priv), GFP_KERNEL); 382 if (!priv) 383 return -ENOMEM; 384 385 /* Use second interrupt-in endpoint for reading. */ 386 priv->read_urb = port->serial->port[1]->interrupt_in_urb; /* missing sanity check -> possible null-pointer dereference */ 387 priv->read_urb->context = port; 388 389 spin_lock_init(&priv->lock); 390 391 usb_set_serial_port_data(port, priv); 392 393 return 0; 395 } ... **** [*] Configuration-Descriptor bLength: 0x9 bDescriptorType: 0x2 wTotalLength: 0x27 bNumInterfaces: 0x1 bConfigurationValue: 0x1 iConfiguration: 0x0 bmAttributes: 0x0 bMaxPower: 0x31 [*] Interface-Descriptor bLength: 0x9 bDescriptorType: 0x4 bInterfaceNumber: 0x0 bAlternateSetting: 0x0 bNumEndpoints: 0x3 bInterfaceClass: 0x0 bInterfaceSubClass: 0x0 bInterfaceProtocol: 0x0 [*] Endpoint-Descriptor bLength: 0x7 bDescriptorType: 0x5 bEndpointAddress: 0x81 <-- IN-Direction bmAttribut: 0x3 <-- Interrupt-Transfer wMaxPacketSize: 0x404 bInterval: 0xc [*] Endpoint-Descriptor bLength: 0x7 bDescriptorType: 0x5 bEndpointAddress: 0x1 <-- OUT-Direction bmAttribut: 0x2 <-- Bulk-Transfer wMaxPacketSize: 0x4 bInterval: 0xc [*] Endpoint-Descriptor bLength: 0x7 bDescriptorType: 0x5 bEndpointAddress: 0x82 <-- IN-Direction bmAttribut: 0x1 <-- Bulk-Transfer wMaxPacketSize: 0x4 bInterval: 0xc Proof of Concept: 1) The bug can be reproduced using USB-fuzzing framework vUSBf from Sergej Schumilo (github.com/schumilo). The attached vUSBf-obj file contains the payload. Please let us know if you would like to use the Facedancer board. In such case, we could also provide a patched version of vUSBf which allows to reproduce vUSBf-Payloads using the Facedancer board. 2) For a proof of concept we are providing also an Arduino firmware file. Just flash it on Arduino Leonardo and plug it into any RHEL machine. The Arduino will emulate the defective USB device. avrdude -v -p ATMEGA32u4 -c avr109 -P /dev/ttyACM0 -b 57600 -U flash:w:binary.hex The file binary.hex has been attached to this bug report. To prevent automated sending of payloads, use a jumper to connect port D3 and 5V! Severity and Ease of Exploitation The security weakness can be easily exploited. Using our Arduino firmware only physical access to the system is required. Additional info: Stacktrace, vUSBf-Payload, Arduino-Firmware attached. Please assign a CVE for this issue since this is a local DoS of the targeted system. CVSS 4.9 (AV:L/AC:L/Au:N/C:N/I:N/A:C)