CVE-2021-47476 comedi: ni_usb6501: fix NULL-deref in command paths
A malicious USB device can trigger a null pointer dereference in the ni_usb6501 driver, causing a kernel crash and denial of service.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-47476?
CVE-2021-47476 is a medium-severity vulnerability in Linux kernel, published on 22 May 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:
comedi: ni_usb6501: fix NULL-deref in command paths
The driver uses endpoint-sized USB transfer buffers but had no sanity checks on the sizes. This can lead to zero-size-pointer dereferences or overflowed transfer buffers in ni6501_port_command() and ni6501_counter_command() if a (malicious) device has smaller max-packet sizes than expected (or when doing descriptor fuzz testing).
Add the missing sanity checks to probe().
Weakness: CWE-476
Which versions are affected by CVE-2021-47476?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-47476?
Apply the vendor's patch.
Is CVE-2021-47476 being exploited?
There is no known exploitation of CVE-2021-47476 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2021-47476, GHSA-c84w-j8mj-57ch, UBUNTU-CVE-2021-47476.