iio: buffer: serialize buffer teardown with mode claims
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0a8565425afd8ba0e1a0ea73e21da119ee6dacea · < e63188d77e10c0951bf67da6c295f768fd1abf4b| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: buffer: serialize buffer teardown with mode claims
Buffer-mode claims hold mlock to guarantee that the device remains in buffer mode until the claim is released. Normal buffer updates take info_exist_lock followed by mlock in iio_update_buffers().
However, iio_device_unregister() disables and deactivates all buffers without taking mlock. This can invalidate buffer state, including active_scan_mask, while a buffer-mode claim is held.
Take mlock in iio_disable_all_buffers() so that unregister honors the mode-claim lifetime guarantee. The info_exist_lock -> mlock ordering matches iio_update_buffers().
From the CVE record · Linux
The Linux kernel's IIO buffer teardown can invalidate buffer state while a buffer-mode claim is held if the device is unregistered concurrently. The input does not specify how an attacker could trigger this condition or whether access or user interaction is required.
Engineers running Linux kernels with IIO devices should check their kernel; affected versions are not specified.