CVE-2021-46906 HID: usbhid: fix info leak in hid_submit_ctrl
A local attacker can trigger an information leak of up to 16384 bytes in the Linux kernel USB HID driver by submitting a zero-size report.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-46906?
CVE-2021-46906 is a medium-severity vulnerability in Linux kernel, published on 26 Feb 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
HID: usbhid: fix info leak in hid_submit_ctrl
In hid_submit_ctrl(), the way of calculating the report length doesn't take into account that report->size can be zero. When running the syzkaller reproducer, a report of size 0 causes hid_submit_ctrl) to calculate transfer_buffer_length as 16384. When this urb is passed to the usb core layer, KMSAN reports an info leak of 16384 bytes.
To fix this, first modify hid_report_len() to account for the zero report size case by using DIV_ROUND_UP for the division. Then, call it from hid_submit_ctrl().
Weakness: CWE-668
Which versions are affected by CVE-2021-46906?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-46906?
Apply the vendor's patch.
Is CVE-2021-46906 being exploited?
There is no known exploitation of CVE-2021-46906 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2021-46906, GHSA-jc66-9qcw-88hp, UBUNTU-CVE-2021-46906.