# CVE-2023-54324: dm: fix a race condition in retrieve_deps

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 9% of CVEs (2026-12-01)
- Published: 2025-12-30T12:37:08.337Z
- Modified: 2026-06-17T06:47:13.727Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

dm: fix a race condition in retrieve_deps

There's a race condition in the multipath target when retrieve_deps
races with multipath_message calling dm_get_device and dm_put_device.
retrieve_deps walks the list of open devices without holding any lock
but multipath may add or remove devices to the list while it is
running. The end result may be memory corruption or use-after-free
memory access.

See this description of a UAF with multipath_message():
https://listman.redhat.com/archives/dm-devel/2022-October/052373.html

Fix this bug by introducing a new rw semaphore "devices_lock". We grab
devices_lock for read in retrieve_deps and we grab it for write in
dm_get_device and dm_put_device.

(As written by CVE List.)

## Affected

- Linux Linux: from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before dbf1a719850577bb51fc7512a3972994b797a17b; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 38f6e5ae5d9ff4a4050ea6f7b543d5d5a4e087cf; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before f6007dce0cd35d634d9be91ef3515a6385dcee16; 2.6.12 (not affected: before 2.6.12; from 6.1.56 up to 6.1.*; from 6.5.5 up to 6.5.*; from 6.6 up to *)

## References

- <https://git.kernel.org/stable/c/dbf1a719850577bb51fc7512a3972994b797a17b>
- <https://git.kernel.org/stable/c/38f6e5ae5d9ff4a4050ea6f7b543d5d5a4e087cf>
- <https://git.kernel.org/stable/c/f6007dce0cd35d634d9be91ef3515a6385dcee16>

## Sources

- CVE List: [CVE-2023-54324](https://www.cve.org/CVERecord?id=CVE-2023-54324), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2023-54324](https://nvd.nist.gov/vuln/detail/CVE-2023-54324), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-54324 · Whole record: https://cve.day/CVE-2023-54324.json · Rebuilt by cve.day 2026-11-25T22:58:35.276Z
