New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 2 users
Status: Fixed
Owner:
Closed: Aug 2014
Cc:



Sign in to add a comment
Linux kernel hid-logitech-dj.c device_index arbitrary kfree
Project Member Reported by hawkes@google.com, Aug 18 2014 Back to list
A bug exists in drivers/hid/hid-logitech-dj.c that can result in a kfree of an arbitrary pointer. The logi_dj_recv_destroy_djhid_device function fails to bounds check the device_index that is supplied in the device-controlled “struct dj_report”. This leads to an out-of-bounds array access, since djrcv_dev->paired_dj_devices has 7 elements and the device_index is a character type (i.e. indexes up to 255). 

We consider this a security bug in the context of an attacker who gains short-term physical access to a running device with the goal of turning this into long-term remote access. We have confirmed that this issue is triggerable in practice by modifying QEMU’s “dev-hid.c” to exhibit a malformed REPORT_TYPE_NOTIF_DEVICE_UNPAIRED report type. 

I’ve attached a non-tested patch that attempts to address the issue, and also variants in logi_dj_recv_forward_null_report and logi_dj_recv_forward_report. The idea is to move the device_id bounds check to the earliest possible point in logi_dj_raw_event.

This bug is subject to a 90 day disclosure deadline. If 90 days elapse
without a broadly available patch, then the bug report will automatically
become visible to the public.

 
logitech-dj-device-index-fix.patch
1.2 KB Download
Project Member Comment 1 by hawkes@google.com, Aug 21 2014
Labels: -Restrict-View-Commit
The patch has been fixed up and committed by Jiri Kosina: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ad3e14d7c5268c2e24477c6ef54bbdf88add5d36

Thanks for the fast response from security@kernel.org and Jiri.

Project Member Comment 2 by hawkes@google.com, Aug 21 2014
Status: Fixed
Comment 3 by cevans@google.com, Aug 23 2014
Labels: Fixed-2014-Aug-21
Project Member Comment 4 by hawkes@google.com, Sep 11 2014
Labels: CVE-2014-3182
Sign in to add a comment