Linux kernel ID leak in Exar GPIO probe cleanup
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5300ebb695fa0672589ab191062392f686fca75d · < f7ec4dbd2a073dd53b6349be1c586fe8580dd6b2| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
gpio: exar: initialize the ID before registering its cleanup
devm_add_action_or_reset() invokes the cleanup action immediately when registering the action fails. gpio_exar_probe() currently stores the allocated ID in exar_gpio only after registering the action, so that failure makes exar_devm_ida_free() release ID 0. If the allocated ID is nonzero, this leaks that ID and can free ID 0 belonging to another device.
Store the ID before registering the cleanup action so both the immediate failure path and normal device teardown release the correct allocation.
From the CVE record · Linux
The Linux kernel’s gpio exar driver can release ID 0 instead of the allocated ID if cleanup-action registration fails. When the allocated ID is nonzero, this can leak that ID and free ID 0 belonging to another device. The input does not describe an attacker, authentication requirement, or user interaction.
Teams running Linux kernels with the gpio exar driver should check their kernel versions; affected versions are not specified.