iio: light: gp2ap002: fix runtime PM leak on read error
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f6dbf83c17cb223ceabd7c42d441414f3e0e8a86 · < 0c655d067ac69ee24e2e9d706c54179ea58a43db| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: light: gp2ap002: fix runtime PM leak on read error
gp2ap002_read_raw() calls pm_runtime_get_sync() before reading the lux value, but if gp2ap002_get_lux() fails, it returns directly. This skips the pm_runtime_put_autosuspend() call at the "out" label, permanently leaking a runtime PM reference and preventing the device from autosuspending.
Replace the direct return with a "goto out" to ensure the reference is properly dropped on the error path.
From the CVE record · Linux
The Linux kernel’s gp2ap002 light driver leaks a runtime power-management reference when a lux reading fails, preventing the device from autosuspending. The input does not describe an attacker action or specify network access, authentication, or user interaction conditions.
Engineers running Linux kernels with the gp2ap002 light driver should check their versions; affected versions are not specified.