CVE-2021-47477 comedi: dt9812: fix DMA buffers on stack
A vulnerability in the Linux kernel dt9812 driver allows attackers to read stack memory or cause denial of service due to improper DMA buffer allocation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-47477?
CVE-2021-47477 is a medium-severity vulnerability in Linux kernel, published on 22 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
comedi: dt9812: fix DMA buffers on stack
USB transfer buffers are typically mapped for DMA and must not be allocated on the stack or transfers will fail.
Allocate proper transfer buffers in the various command helpers and return an error on short transfers instead of acting on random stack data.
Note that this also fixes a stack info leak on systems where DMA is not used as 32 bytes are always sent to the device regardless of how short the command is.
Weakness: CWE-787
Which versions are affected by CVE-2021-47477?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-47477?
Apply the vendor's patch.
Is CVE-2021-47477 being exploited?
There is no known exploitation of CVE-2021-47477 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2021-47477, GHSA-6vq2-rrj2-6jjh, UBUNTU-CVE-2021-47477.