Linux: iio: buffer: serialize buffer teardown with mode claims
What fixes it
- 6a728408ff522b749c2a3c7e68f44e861fa0dbfbLinuxCVE List
- 89f3852a28fcf7bab599280cb082baa0675536dbLinuxCVE List
- 84bb0fc46ccf6a545b8fdf57cda83770186ed8ddLinuxCVE List
- 5.16LinuxCVE List
- 6.2LinuxCVE 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: 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().
Text from CVE List
Affected versions 16
- Linuxaffected: 0a8565425afd8ba0e1a0ea73e21da119ee6dacea before 6a728408ff522b749c2a3c7e68f44e861fa0dbfbCVE List
- Linuxaffected: 0a8565425afd8ba0e1a0ea73e21da119ee6dacea before 89f3852a28fcf7bab599280cb082baa0675536dbCVE List
- Linuxaffected: 0a8565425afd8ba0e1a0ea73e21da119ee6dacea before b466db9e68b4741af85f6c017e2bb0a2f025053fCVE List
- Linuxaffected: 0a8565425afd8ba0e1a0ea73e21da119ee6dacea before e63188d77e10c0951bf67da6c295f768fd1abf4bCVE List
- Linuxaffected: 0a8565425afd8ba0e1a0ea73e21da119ee6dacea before 84bb0fc46ccf6a545b8fdf57cda83770186ed8ddCVE List
- Linuxaffected: a9c471892d75847671a246619c2148578f22bbc6CVE List
- Linuxaffected: 7bca0af538a49dacb1470f233be0676bdc09605bCVE List
- Linuxaffected: 5.15.137 before 5.16CVE List
- Linuxaffected: 6.1.60 before 6.2CVE List
- Linuxaffected: 6.2CVE List
- Linuxunaffected: all versions before 6.2CVE 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/6a728408ff522b749c2a3c7e68f44e861fa0dbfbReferencevia CVE List
- git.kernel.org/stable/c/89f3852a28fcf7bab599280cb082baa0675536dbReferencevia CVE List
- git.kernel.org/stable/c/b466db9e68b4741af85f6c017e2bb0a2f025053fReferencevia CVE List
- git.kernel.org/stable/c/e63188d77e10c0951bf67da6c295f768fd1abf4bReferencevia CVE List
- git.kernel.org/stable/c/84bb0fc46ccf6a545b8fdf57cda83770186ed8ddReferencevia CVE List