# CVE-2021-47477: comedi: dt9812: fix DMA buffers on stack

- Severity: Medium 5.3 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.72%, higher than 55% of CVEs (2026-12-01)
- Published: 2024-05-22T08:19:30.860Z
- Modified: 2026-06-17T04:17:33.837Z
- Weaknesses: CWE-787
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 63274cd7d38a3322d90b66a5bc976de1fb899051 before a6af69768d5cb4b2528946d53be5fa19ade37723; from 63274cd7d38a3322d90b66a5bc976de1fb899051 before 365a346cda82f51d835c49136a00a9df8a78c7f2; from 63274cd7d38a3322d90b66a5bc976de1fb899051 before 8a52bc480992c7c9da3ebfea456af731f50a4b97; from 63274cd7d38a3322d90b66a5bc976de1fb899051 before 39ea61037ae78f14fa121228dd962ea3280eacf3; from 63274cd7d38a3322d90b66a5bc976de1fb899051 before 3efb7af8ac437085b6c776e5b54830b149d86efe; from 63274cd7d38a3322d90b66a5bc976de1fb899051 before 786f5b03450454557ff858a8bead5d7c0cbf78d6; from 63274cd7d38a3322d90b66a5bc976de1fb899051 before 3ac273d154d634e2034508a14db82a95d7ad12ed; from 63274cd7d38a3322d90b66a5bc976de1fb899051 before 20cebb8b620dc987e55ddc46801de986e081757e; from 63274cd7d38a3322d90b66a5bc976de1fb899051 before 536de747bc48262225889a533db6650731ab25d3; 2.6.29 (not affected: before 2.6.29; from 4.4.292 up to 4.4.*; from 4.9.290 up to 4.9.*; from 4.14.255 up to 4.14.*; from 4.19.217 up to 4.19.*; from 5.4.159 up to 5.4.*; from 5.10.79 up to 5.10.*; from 5.14.18 up to 5.14.*; from 5.15.2 up to 5.15.*; from 5.16 up to *)
- linux linux_kernel: from 2.6.29 before 4.4.292; from 4.5 before 4.9.290; from 4.10 before 4.14.255; from 4.15 before 4.19.217; from 4.20 before 5.4.159; from 5.5 before 5.10.79; from 5.11 before 5.14.18; from 5.15 before 5.15.2

## Every score

- CISA-ADP: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/a6af69768d5cb4b2528946d53be5fa19ade37723> (patch)
- <https://git.kernel.org/stable/c/365a346cda82f51d835c49136a00a9df8a78c7f2> (patch)
- <https://git.kernel.org/stable/c/8a52bc480992c7c9da3ebfea456af731f50a4b97> (patch)
- <https://git.kernel.org/stable/c/39ea61037ae78f14fa121228dd962ea3280eacf3> (patch)
- <https://git.kernel.org/stable/c/3efb7af8ac437085b6c776e5b54830b149d86efe> (patch)
- <https://git.kernel.org/stable/c/786f5b03450454557ff858a8bead5d7c0cbf78d6> (patch)
- <https://git.kernel.org/stable/c/3ac273d154d634e2034508a14db82a95d7ad12ed> (patch)
- <https://git.kernel.org/stable/c/20cebb8b620dc987e55ddc46801de986e081757e> (patch)
- <https://git.kernel.org/stable/c/536de747bc48262225889a533db6650731ab25d3> (patch)

## Sources

- CVE List: [CVE-2021-47477](https://www.cve.org/CVERecord?id=CVE-2021-47477), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-47477](https://nvd.nist.gov/vuln/detail/CVE-2021-47477), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47477 · Whole record: https://cve.day/CVE-2021-47477.json · Rebuilt by cve.day 2026-11-25T22:58:08.876Z
