dm: fix unlocked test for dm_suspended_md
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
dm: fix unlocked test for dm_suspended_md
The function dm_blk_report_zones tests if the device is suspended with the "dm_suspended_md" call. However, this function is called without holding any locks, so the device may be suspended just after it.
Move the call to dm_suspended_md after dm_get_live_table, so that the device can't be suspended after the suspended state was tested.
From the CVE record · Linux
The Linux kernel’s dm_blk_report_zones checks whether a device is suspended without holding a lock, allowing the device to be suspended immediately after the check. This can cause the function to act on an outdated suspension state when zone reporting and suspension occur concurrently. The input does not specify an attacker action, access requirement, or user interaction.
Engineers running the Linux kernel should check their versions; affected versions are not specified.