iio: proximity: pulsedlight: fix iio_device left registered on PM setup failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4ac4e086fd8c59e6b69089e6f7605500b63a6d17 · < 20ebd7f4e35c0a737f011bc83aeb0cdd37507648| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: proximity: pulsedlight: fix iio_device left registered on PM setup failure
pm_runtime_set_active() failing in probe() jumps to error_unreg_buffer, which only calls iio_triggered_buffer_cleanup() -- it does not undo the iio_device_register() that already succeeded a few lines above. probe() then returns the error, the devm-managed indio_dev is freed, but the iio core still has it registered: the sysfs/chardev nodes stay live and point at freed memory.
Add an error_unreg_dev label that unregisters the iio device before falling through to the existing buffer cleanup, mirroring the teardown order already used in lidar_remove().
From the CVE record · Linux
If runtime power-management setup fails during probe, the pulsedlight proximity driver leaves an IIO device registered after its memory is freed. Its sysfs and character-device nodes remain live and point to freed memory; the input does not establish whether exploitation requires authentication or user interaction.
Engineers running Linux kernels with the pulsedlight proximity driver should check their exposure; affected versions are not specified.