iio: mma8452: Fix trigger reference couting
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ae6d9ce05691bf79694074db7c7da980080548af · < db12d95085367de8b0223929d1332731024441f1| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: mma8452: Fix trigger reference couting
The mma8452 driver directly assigns a trigger to the struct iio_dev. The IIO core when done using this trigger will call `iio_trigger_put()` to drop the reference count by 1.
Without the matching `iio_trigger_get()` in the driver the reference count can reach 0 too early, the trigger gets freed while still in use and a use-after-free occurs.
Fix this by getting a reference to the trigger before assigning it to the IIO device.
From the CVE record · Linux
The mma8452 driver fails to take a reference to a trigger before assigning it to an IIO device. The trigger can be freed while still in use, causing a use-after-free. The input does not specify how an attacker could reach this condition or whether authentication or user interaction is required.
Engineers running Linux kernels with the mma8452 driver should check their kernel version; affected versions are not specified.