comedi: Fix memory leak in compat_insnlist()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
5.10.705.14.95.15In 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.
From the CVE record · Linux
The Linux kernel's comedi compat_insnlist() leaks temporary memory when it successfully converts a 32-bit COMEDI_INSNLIST ioctl request. A local user able to issue that ioctl can trigger the leak when CONFIG_COMPAT is enabled; the input does not specify authentication requirements.
Engineers running Linux kernels with CONFIG_COMPAT and comedi support should check their kernel versions; affected versions are not specified.