gpio: aggregator: fix a potential use-after-free
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 |
|
|
6.18.347.0.117.1In the Linux kernel, the following vulnerability has been resolved:
gpio: aggregator: fix a potential use-after-free
On error we free aggr->lookups->dev_id before removing the entry from the lookup table. If a concurrent thread calls gpiod_find() before we remove the entry, it could iterate over the list and call gpiod_match_lookup_table() which unconditionally dereferences dev_id when calling strcmp(). Reverse the order of cleanup.
From the CVE record · Linux
The Linux kernel GPIO aggregator can free a lookup entry’s device ID before removing the entry from the lookup table. If a concurrent thread calls gpiod_find() during that interval, it can dereference the freed ID. The input does not establish an attack path, authentication requirements, or user-interaction requirements.
Engineers running Linux kernels with the GPIO aggregator should check their kernel; affected versions are not specified.