Local RedHat Enterprise Linux DoS â?? RHEL 7.1 Kernel crashes on invalid USB device descriptors (visor treo_attach driver)
The Kernel 3.10.0-229.20.1.el7.x86_64 crashes on presentation of a buggy USB device requiring the visor (treo_attach) driver. The bug was found using the USB-fuzzing framework vUSBf from Sergej Schumilo (github.com/schumilo) using the following device descriptor: [bLength: 0x12, bDescriptorType: 0x1, bcdUSB: 0x200, bDeviceClass: 0x3, bDeviceSubClass: 0x0, bDeviceProtocol: 0x0, bMaxPacketSize: 0x40, idVendor: 0x82d, idProduct: 0x200, bcdDevice: 0x100, iManufacturer: 0x1, iProduct: 0x2, iSerialNumbers: 0x3, bNumConfigurations: 0x1]. The treo_attach function does not use the num_ports (struct usb_serial) value for any kind of sanity checks during the initialization process. Due to an incomplete sanity check, the driver could try to dereference a null-pointer if a malformed device-descriptor is presented (zero-value for bNumEndpoints or no required endpoint-descriptors is provided). This results in a crash of the system.