CVE-2021-47364: comedi: Fix memory leak in compat_insnlist()
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.
Security readout for executives and security teams
Plain-English summary
CVE-2021-47364 is a Linux kernel memory leak in COMEDI 32-bit compatibility ioctl handling. The public record describes a missing free after converting user-supplied instruction lists. No CVSS score, CWE, or active exploitation evidence is provided in the source bundle.
Executive priority
Treat this as routine kernel hygiene unless your environment relies on COMEDI or exposes 32-bit compatibility ioctl paths. There is no supplied evidence of active exploitation, but affected kernels should still be patched through standard maintenance.
Technical view
The issue is in compat_insnlist(), used for the 32-bit COMEDI_INSNLIST ioctl when CONFIG_COMPAT is enabled. Temporary kernel memory allocated for converted struct comedi_insn entries was freed only on a fault path, not after normal processing. Stable kernel commits add the missing kfree().
Likely exposure
Exposure appears limited to Linux systems using affected kernel versions with COMEDI ioctl compatibility handling reachable. The source does not identify specific distributions, devices, default configurations, or whether unprivileged users can reach the path.
Exploitation context
The CVE is not listed as KEV in the supplied data, and the bundle provides no public exploitation claim. The described weakness is a memory leak, but practical exploitability and operational impact are not quantified.
Researcher notes
The source bundle is narrow: it identifies the leaking function, condition, and stable commits, but omits CVSS, CWE, exploitability, privilege requirements, and distribution mapping. Avoid over-scoping beyond COMEDI compat ioctl handling.
Mitigation direction
Upgrade to a kernel or distribution package containing the referenced stable fixes.
Check Linux vendor advisories for backported fixes in supported distribution kernels.
Prioritize systems where COMEDI drivers and 32-bit compatibility are enabled.
Track remediation through normal kernel patch management and reboot procedures.
Validation and detection
Inventory kernel versions against the affected version data in the CVE record.
Confirm whether CONFIG_COMPAT is enabled on relevant Linux hosts.
Identify hosts using COMEDI-related kernel functionality or drivers.
Verify vendor kernel changelogs include the referenced stable fix commits.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47364 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.