CWE
476
Advisory Published
CVE Published
Updated

CVE-2016-2782: Null Pointer Dereference

First published: Sun Feb 28 2016(Updated: )

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 &lt; ARRAY_SIZE(src-&gt;read_urbs); ++i) { \ 559 dest-&gt;read_urbs[i] = src-&gt;read_urbs[i]; \ /* Possible Nullpointer-Dereference */ 560 dest-&gt;read_urbs[i]-&gt;context = dest; \ 561 dest-&gt;bulk_in_buffers[i] = src-&gt;bulk_in_buffers[i]; \ 562 } \ 563 dest-&gt;read_urb = src-&gt;read_urb; \ 564 dest-&gt;bulk_in_endpointAddress = src-&gt;bulk_in_endpointAddress;\ 565 dest-&gt;bulk_in_buffer = src-&gt;bulk_in_buffer; \ 566 dest-&gt;bulk_in_size = src-&gt;bulk_in_size; \ 567 dest-&gt;interrupt_in_urb = src-&gt;interrupt_in_urb; \ 568 dest-&gt;interrupt_in_urb-&gt;context = dest; \ 569 dest-&gt;interrupt_in_endpointAddress = \ 570 src-&gt;interrupt_in_endpointAddress;\ 571 dest-&gt;interrupt_in_buffer = src-&gt;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-&gt;port[0]); /* no sanity-check! */ 578 COPY_PORT(serial-&gt;port[0], serial-&gt;port[1]); /* no sanity-check! */ 579 COPY_PORT(serial-&gt;port[1], swap_port); /* no sanity-check! */ ... **** Reproducer can be found in original bug report: <a class="bz_bug_link bz_status_CLOSED bz_closed bz_public " title="CLOSED WONTFIX - CVE-2016-2782 Local RedHat Enterprise Linux DoS – RHEL 7.1 Kernel crashes on invalid USB device descriptors (visor driver) [local-DoS]" href="show_bug.cgi?id=1283374">https://bugzilla.redhat.com/show_bug.cgi?id=1283374</a> An upstream patch: <a href="http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cb3232138e37129e88240a98a1d2aba2187ff57c">http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cb3232138e37129e88240a98a1d2aba2187ff57c</a> Public via: <a href="http://seclists.org/bugtraq/2016/Mar/86">http://seclists.org/bugtraq/2016/Mar/86</a> CVE-ID request and assignment: <a href="http://seclists.org/oss-sec/2016/q1/456">http://seclists.org/oss-sec/2016/q1/456</a> <a href="http://seclists.org/oss-sec/2016/q1/458">http://seclists.org/oss-sec/2016/q1/458</a>

Credit: secalert@redhat.com secalert@redhat.com

Affected SoftwareAffected VersionHow to fix
Linux Linux kernel<4.5.0
Linux Linux kernel=4.5.0-rc1
SUSE Linux Enterprise Debuginfo=11-sp2
SUSE Linux Enterprise Debuginfo=11-sp4
Suse Linux Enterprise Module For Public Cloud=12
SUSE Linux Enterprise Desktop=12
SUSE Linux Enterprise Desktop=12-sp1
Suse Linux Enterprise Real Time Extension=11-sp4
Suse Linux Enterprise Real Time Extension=12-sp1
SUSE Linux Enterprise Server=11-sp2
SUSE Linux Enterprise Server=11-sp4
SUSE Linux Enterprise Server=12
SUSE Linux Enterprise Server=12-sp1
SUSE Linux Enterprise Software Development Kit=11-sp4
SUSE Linux Enterprise Software Development Kit=12
SUSE Linux Enterprise Software Development Kit=12-sp1
Suse Linux Enterprise Workstation Extension=12
Suse Linux Enterprise Workstation Extension=12-sp1
debian/linux
5.10.223-1
5.10.226-1
6.1.115-1
6.1.112-1
6.11.5-1
6.11.7-1

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

Frequently Asked Questions

  • What is CVE-2016-2782?

    CVE-2016-2782 is a vulnerability in the Linux kernel before version 4.5 that allows physically proximate attackers to cause a denial of service or possibly have unspecified other impact by inserting a USB device without a bulk-in or interrupt endpoint.

  • How severe is CVE-2016-2782?

    CVE-2016-2782 has a severity level of low.

  • How can I fix CVE-2016-2782?

    To fix CVE-2016-2782, update your Linux kernel to version 4.5 or later.

  • Are there any exploits available for CVE-2016-2782?

    Yes, there is an exploit available for CVE-2016-2782. You can find it at the following link: https://www.exploit-db.com/exploits/39539/

  • Where can I find more information about CVE-2016-2782?

    You can find more information about CVE-2016-2782 at the following links: http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00019.html, http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00052.html

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203