Linux: iio: proximity: pulsedlight: fix iio_device left registered on PM setup failure
What fixes it
- 2c8211eef98929c5188f8c2224e83b9a63b41bd1LinuxCVE List
- 06fa13c53442257b94ea1519555ceddaaea57e0dLinuxCVE List
- 20ebd7f4e35c0a737f011bc83aeb0cdd37507648LinuxCVE List
- 4daa9ca557b4b98ae1ad38a6d1deaa3e31eb8edfLinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
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().
Text from CVE List
Affected versions 12
- Linuxaffected: 4ac4e086fd8c59e6b69089e6f7605500b63a6d17 before 2c8211eef98929c5188f8c2224e83b9a63b41bd1CVE List
- Linuxaffected: 4ac4e086fd8c59e6b69089e6f7605500b63a6d17 before 06fa13c53442257b94ea1519555ceddaaea57e0dCVE List
- Linuxaffected: 4ac4e086fd8c59e6b69089e6f7605500b63a6d17 before 20ebd7f4e35c0a737f011bc83aeb0cdd37507648CVE List
- Linuxaffected: 4ac4e086fd8c59e6b69089e6f7605500b63a6d17 before e462b47b9637b8c0285f4a38b5af9a322847d164CVE List
- Linuxaffected: 4ac4e086fd8c59e6b69089e6f7605500b63a6d17 before 4daa9ca557b4b98ae1ad38a6d1deaa3e31eb8edfCVE List
- Linuxaffected: 4.5CVE List
- Linuxunaffected: all versions before 4.5CVE List
- Linuxunaffected: 6.6.160 through 6.6.*CVE List
- Linuxunaffected: 6.12.113 through 6.12.*CVE List
- Linuxunaffected: 6.18.56 through 6.18.*CVE List
- Linuxunaffected: 7.2.10 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 5
- git.kernel.org/stable/c/2c8211eef98929c5188f8c2224e83b9a63b41bd1Referencevia CVE List
- git.kernel.org/stable/c/06fa13c53442257b94ea1519555ceddaaea57e0dReferencevia CVE List
- git.kernel.org/stable/c/20ebd7f4e35c0a737f011bc83aeb0cdd37507648Referencevia CVE List
- git.kernel.org/stable/c/e462b47b9637b8c0285f4a38b5af9a322847d164Referencevia CVE List
- git.kernel.org/stable/c/4daa9ca557b4b98ae1ad38a6d1deaa3e31eb8edfReferencevia CVE List