CVE-2021-47364
JSON

5.5medium

comedi: Fix memory leak in compat_insnlist()

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.24% (higher than 16% of CVEs; EPSS, by FIRST)
Published
Last changed
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.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 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 *
CVE List
linux linux_kernelfrom 5.8 before 5.10.70, from 5.11 before 5.14.9, 5.15NVD

Classification

CWE-401

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: comedi: Reparar pérdida de memoria en compat_insnlist() `compat_insnlist()` maneja la versión de 32 bits del ioctl `COMEDI_INSNLIST` (cuando `CONFIG_COMPAT` está habilitado). Asigna memoria para almacenar temporalmente una matriz de `struct comedi_insn` convertida desde la versión de 32 bits en el espacio de usuario. Esta memoria solo se libera si hay una falla al llenar la matriz; de lo contrario, se pierde. Agregue una llamada a `kfree()` para solucionar la fuga.

References

Sources

SourceRecordLicence
CVE ListCVE-2021-47364 changed 2026-05-11CVE Terms of Use
NVDCVE-2021-47364 changed 2026-06-17Public domain