Bug 1283375
Summary: | CVE-2016-3139 Local RedHat Enterprise Linux DoS – RHEL 7.1 Kernel crashes on invalid USB device descriptors (wacom driver) [local-DoS] | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Ralf Spenneberg <ralf> | ||||||||||
Component: | kernel | Assignee: | Don Zickus <dzickus> | ||||||||||
kernel sub component: | USB | QA Contact: | Mike Gahagan <mgahagan> | ||||||||||
Status: | CLOSED WONTFIX | Docs Contact: | |||||||||||
Severity: | high | ||||||||||||
Priority: | unspecified | CC: | sergej, vdronov | ||||||||||
Version: | 7.1 | Keywords: | Security, SecurityTracking | ||||||||||
Target Milestone: | rc | ||||||||||||
Target Release: | 7.3 | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | Release Note | |||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2016-03-15 10:41:49 UTC | Type: | Bug | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Bug Depends On: | |||||||||||||
Bug Blocks: | 1316993 | ||||||||||||
Attachments: |
|
Description
Ralf Spenneberg
2015-11-18 20:27:10 UTC
Created attachment 1096285 [details]
vUSBf Payload
Created attachment 1096288 [details]
Stacktrace
Created attachment 1096289 [details]
Arduino firmware demonstrating the bug
This bz and bz1283377 are related, as both are caused by the same issue, zero endpoints, while the driver expects at least one endpoint to be present. The bug is that the driver does not check that at least one endpoint is present and accesses the first endpoint causing null-ptr deref. Crashes in these 2 bzs are in the different places because of the different execution paths. [ drivers/input/tablet/wacom_sys.c ] static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id) { ... endpoint = &intf->cur_altsetting->endpoint[0].desc; <<< This is NULL ... usb_fill_int_urb(wacom->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress), << 0-deref wacom_wac->data, features->pktlen, wacom_sys_irq, wacom, endpoint->bInterval); 1c: 48 8b 45 b8 mov -0x48(%rbp),%rax // endpoint (==null) 20: 41 8b b7 88 00 00 00 mov 0x88(%r15),%esi 27: 49 8b 7f 60 mov 0x60(%r15),%rdi >>2b:* 0f b6 50 02 movzbl 0x2(%rax),%edx // ->bEndpointAddress *BOOM* 2f: 0f b6 48 06 movzbl 0x6(%rax),%ecx // ->bInterval The upstream driver was rebased and does not have this bug, so this bug is rhel7-only. The fix is to check the number of endpoints (as it was done in [aiptek] driver fix at http://www.spinics.net/lists/linux-input/msg42294.html, [aiptek] was based on [wacom]). Rhel7 patch follows. Created attachment 1099056 [details]
wacom-null-deref.rhel7.patch
Public via: http://seclists.org/bugtraq/2016/Mar/60 CVEID was requested at: http://seclists.org/oss-sec/2016/q1/606 CVE-2016-3139 was assigned to this flaw, please, use it in the related communications, see http://seclists.org/oss-sec/2016/q1/623. Thank you for reporting this flaw. The Product Security has rated this flaw as having low security impact (bz1316993), so the patch currently is not planned to be added to the RHEL source trees. The upstream and Fedora is rebased, so the fix may get to the RHEL trees at the next USB subsystem code rebase. |