# CVE-2021-47364: comedi: Fix memory leak in compat_insnlist()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- 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.24%, higher than 16% of CVEs (2026-12-01)
- Published: 2024-05-21T15:03:31.852Z
- Modified: 2026-06-17T04:17:17.983Z
- Weaknesses: CWE-401
- 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: Fix memory leak in compat_insnlist()

`compat_insnlist()` handles the 32-bit version of the `COMEDI_INSNLIST`
ioctl (whenwhen `CONFIG_COMPAT` is enabled).  It allocates memory to
temporarily hold an array of `struct comedi_insn` converted from the
32-bit version in user space.  This memory is only being freed if there
is a fault while filling the array, otherwise it is leaked.

Add a call to `kfree()` to fix the leak.

(As written by CVE List.)

## Affected

- Linux Linux: from b8d47d8813055ce38c0d2ad913d5462017e52692 before 8d6a21e4cd6a319b0662cbe4ad6199e276ac776a; from b8d47d8813055ce38c0d2ad913d5462017e52692 before f217b6c1e28ed0b353634ce4d92a155b80bd1671; from b8d47d8813055ce38c0d2ad913d5462017e52692 before bb509a6ffed2c8b0950f637ab5779aa818ed1596; 5.8 (not affected: before 5.8; from 5.10.70 up to 5.10.*; from 5.14.9 up to 5.14.*; from 5.15 up to *)
- linux linux_kernel: from 5.8 before 5.10.70; from 5.11 before 5.14.9; 5.15

## References

- <https://git.kernel.org/stable/c/8d6a21e4cd6a319b0662cbe4ad6199e276ac776a> (patch)
- <https://git.kernel.org/stable/c/f217b6c1e28ed0b353634ce4d92a155b80bd1671> (patch)
- <https://git.kernel.org/stable/c/bb509a6ffed2c8b0950f637ab5779aa818ed1596> (patch)

## Sources

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

---

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