iio: accel: kxsd9: fix runtime PM imbalance on write_raw() error
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 9a9a369d6178dd4e263c49085ce1b37e1e8f63a0 · < 6293211d142605bec435229ef0aa3668b8964164| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: accel: kxsd9: fix runtime PM imbalance on write_raw() error
kxsd9_write_raw() takes a runtime PM reference with pm_runtime_get_sync() but returns -EINVAL directly when a scale with a non-zero integer part is requested, skipping the matching pm_runtime_put_autosuspend(). This leaks a runtime PM usage-counter reference on every such write, after which the device can no longer autosuspend.
Set the error code and fall through to the existing put instead of returning early.
From the CVE record · Linux
The Linux kernel's kxsd9 accelerometer driver leaks a runtime power-management reference when a caller requests a scale with a non-zero integer part. Repeated such writes can prevent the device from autosuspending. The input does not specify authentication requirements or whether the write can be triggered remotely.
Engineers running Linux systems with the kxsd9 accelerometer driver should check their kernel versions; affected versions are not specified.