iio: accel: kionix-kx022a: Prevent memory leak and fix state
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: accel: kionix-kx022a: Prevent memory leak and fix state
The driver allocates memory for samples at buffer enable path. If regmap operation fails in the kx022a_fifo_enable() at the buffer enable path, the allocated memory is never freed. Furthermore, the state information and previous hardware configuration(s) aren't undone, potentially leaving WMI interrupts and buffers enabled, or driver state flags wrong.
Free the memory and revert the hardware configuration and state flags on error path.
From the CVE record · Linux
The kionix-kx022a accelerometer driver can leak sample memory if a regmap operation fails while enabling the buffer. The failure can also leave interrupts, buffers, or driver state incorrectly configured. The input does not specify an attack path, authentication requirements, or user interaction.
Engineers running the Linux kernel with the kionix-kx022a accelerometer driver should check their systems; affected versions are not specified.