This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1312670 - (CVE-2016-2782) CVE-2016-2782 kernel: visor: crash on invalid USB device descriptors in treo_attach() in visor driver
CVE-2016-2782 kernel: visor: crash on invalid USB device descriptors in treo_...
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20160112,reported=2...
: Security
Depends On: 1283374 1312671
Blocks: 1312672
  Show dependency treegraph
 
Reported: 2016-02-28 11:48 EST by Vladis Dronov
Modified: 2016-05-15 05:37 EDT (History)
32 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-28 14:26:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vladis Dronov 2016-02-28 11:48:27 EST
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
Comment 1 Vladis Dronov 2016-02-28 11:49:19 EST
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1312671]
Comment 2 Vladis Dronov 2016-02-28 12:09:11 EST
Acknowledgments:

Name: Ralf Spenneberg (OpenSource Security)
Comment 3 Vladis Dronov 2016-02-28 12:09:53 EST
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/.

Note You need to log in before you can comment on or make changes to this bug.