Hide Forgot
A local kernel crash on invalid USB device requiring the visor driver was reported. The treo_attach() function of the [visor] driver, which is called during the driver initialization process, was dereferencing the bulk-in and interrupt-in urbs without first making sure they had been allocated by core. Due to an incomplete sanity check, the visor driver tries to dereference null-pointers, which results in crash. Vulnerable code: **** CentOS-Kernel linux-3.10.0-229.14.1.el7 (drivers/usb/serial/visor.c) ... 554 #define COPY_PORT(dest, src) \ 555 do { \ 556 int i; \ 557 \ 558 for (i = 0; i < ARRAY_SIZE(src->read_urbs); ++i) { \ 559 dest->read_urbs[i] = src->read_urbs[i]; \ /* Possible Nullpointer-Dereference */ 560 dest->read_urbs[i]->context = dest; \ 561 dest->bulk_in_buffers[i] = src->bulk_in_buffers[i]; \ 562 } \ 563 dest->read_urb = src->read_urb; \ 564 dest->bulk_in_endpointAddress = src->bulk_in_endpointAddress;\ 565 dest->bulk_in_buffer = src->bulk_in_buffer; \ 566 dest->bulk_in_size = src->bulk_in_size; \ 567 dest->interrupt_in_urb = src->interrupt_in_urb; \ 568 dest->interrupt_in_urb->context = dest; \ 569 dest->interrupt_in_endpointAddress = \ 570 src->interrupt_in_endpointAddress;\ 571 dest->interrupt_in_buffer = src->interrupt_in_buffer; \ 572 } while (0); 573 574 swap_port = kmalloc(sizeof(*swap_port), GFP_KERNEL); 575 if (!swap_port) 576 return -ENOMEM; 577 COPY_PORT(swap_port, serial->port[0]); /* no sanity-check! */ 578 COPY_PORT(serial->port[0], serial->port[1]); /* no sanity-check! */ 579 COPY_PORT(serial->port[1], swap_port); /* no sanity-check! */ ... **** Reproducer can be found in original bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1283374 An upstream patch: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cb3232138e37129e88240a98a1d2aba2187ff57c Public via: http://seclists.org/bugtraq/2016/Mar/86 CVE-ID request and assignment: http://seclists.org/oss-sec/2016/q1/456 http://seclists.org/oss-sec/2016/q1/458
Created kernel tracking bugs for this issue: Affects: fedora-all [bug 1312671]
Acknowledgments: Name: Ralf Spenneberg (OpenSource Security)
Statement: This issue does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 5, 6 as the code with the flaw is not present in the products listed. This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 7 and MRG-2. This has been rated as having Low security impact and is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.