dm: fix reading free memory in do_resume
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.6.160, 6.12.113, 6.18.57, 7.2.11
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: dm: fix reading free memory in do_resume When do_resume calls dm_table_get_mode(new_map), the call is done without holding any locks (it only holds a reference to the md). It may be possible that another concurrent ioctl on the same device will swap table after dm_swap_table and before dm_table_get_mode. In this case, dm_table_get_mode(new_map) reads freed memory. This race condition was triggered by syzbot. This commit fixes the race by reading mode of the new table before dm_swap_table. Note that new_map is also passed to dm_ima_need_measure, but this function doesn't attempt to dereference it, so this call should be safe. Note that this is not a security bug because only root can trigger it and the commonly used tools such as lvm or cryptsetup do not call the ioctls concurrently, so that they can't trigger it acceidentally.
Timeline
- CVE published
- First seen by cve.now
- Record last updated
Affected versions
- Linux Linux
From d58168763f74d1edbc296d7038c60efe6493fdd4 · fixed in 281f68d6cf8acb2547ebf0a849b8beae8fb0ec3c; From d58168763f74d1edbc296d7038c60efe6493fdd4 · fixed in 2c96d1a8324e7736e0f8a5790ecf39d36c2c4a82; From d58168763f74d1edbc296d7038c60efe6493fdd4 · fixed in e3bf232c913b7e0103d323f15e6342d37cb1b357; From d58168763f74d1edbc296d7038c60efe6493fdd4 · fixed in 301691c32b8ad023e3316d5dbb6a8cf52d47b0dc; From d58168763f74d1edbc296d7038c60efe6493fdd4 · fixed in c9417c1c5269e2bd0570fbe53e4ec03a8d31f008
- Linux Linux
2.6.29
- KernelLinux
fixed in 6.6.160; From 6.7.0 · fixed in 6.12.113; From 6.13.0 · fixed in 6.18.57; From 6.19.0 · fixed in 7.2.11