gpiolib: cdev: fix uninitialised kfifo
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
gpiolib: cdev: fix uninitialised kfifo
If a line is requested with debounce, and that results in debouncing in software, and the line is subsequently reconfigured to enable edge detection then the allocation of the kfifo to contain edge events is overlooked. This results in events being written to and read from an uninitialised kfifo. Read events are returned to userspace.
Initialise the kfifo in the case where the software debounce is already active.
From the CVE record · Linux
The Linux kernel GPIO character device can leave its edge-event buffer uninitialized. This occurs when a line requested with software debounce is later reconfigured for edge detection; events are then written to and read from the uninitialized buffer, and reads return events to local userspace. The input does not specify authentication requirements or additional user interaction.
Engineers running Linux kernels that provide the GPIO character device should check their kernel versions; affected versions are not specified.