CVE-2026-89998: dm: fix race when loading and unloading a table
In the Linux kernel, the following vulnerability has been resolved:
dm: fix race when loading and unloading a table
If the userspace calls two concurrent table load ioctls and one of them succeeds and the other fails, there is a race condition because dmsetupmdqueue walks &md->tabledevices without any lock. If the walk races with dmtabledestroy -> freedevices -> dmputtabledevice, there is access to invalid memory.
Fix this race by extending the lock over the list walk.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.190-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.113-1~deb12u1 - Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Compensating control
Extend the lock in dm_setup_md_queue over the walk of md->table_devices so it cannot race with dm_table_destroy -> free_devices -> dm_put_table_device during concurrent table load and unload operations.
Event History
Frequently Asked Questions
What condition is required to trigger the race?
Userspace must issue two table-load ioctls concurrently for the same device-mapper context. The race occurs when one table load succeeds while the other fails, allowing table setup to walk table_devices as the failed table is destroyed.
What is the impact of a successful race?
The kernel can access invalid memory when dm_setup_md_queue walks the table_devices list concurrently with table destruction and removal of table devices.
What change addresses the issue?
The fix extends locking to cover the table_devices list walk, preventing dm_setup_md_queue from racing with dm_table_destroy and its device cleanup.