Skip to contentSkip to conversation

CVE-2026-89998: dm: fix race when loading and unloading a table

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 16

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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 dm_setup_md_queue walks &md->table_devices without any lock. If the walk races with dm_table_destroy -> free_devices -> dm_put_table_device, there is access to invalid memory.

Fix this race by extending the lock over the list walk.

The Linux kernel CVE team has assigned CVE-2026-89998 to this issue.

Affected and fixed versions
===========================

	Fixed in 6.1.188 with commit b02e35b81176c7d61dd441cc7a2e5c324a82444b
	Fixed in 6.6.157 with commit 0ea6e5ad4a5817e91f11b4cc1e022e575ed2e7ca
	Fixed in 6.12.110 with commit a1af1884c960b98c621b6fe2fea1216b78c02152
	Fixed in 6.18.51 with commit af1f32ccf8051f4691ced11feb452b9d13561727
	Fixed in 7.2.5 with commit 00ad6f9ed27f91925d4d3fb7aab50a60d774f998
	Fixed in 7.3-rc1 with commit 5380c7f6335cc6d77eb77d065105e81155c4d9d3

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-89998

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/md/dm.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/b02e35b81176c7d61dd441cc7a2e5c324a82444b
	https://git.kernel.org/stable/c/0ea6e5ad4a5817e91f11b4cc1e022e575ed2e7ca
	https://git.kernel.org/stable/c/a1af1884c960b98c621b6fe2fea1216b78c02152
	https://git.kernel.org/stable/c/af1f32ccf8051f4691ced11feb452b9d13561727
	https://git.kernel.org/stable/c/00ad6f9ed27f91925d4d3fb7aab50a60d774f998
	https://git.kernel.org/stable/c/5380c7f6335cc6d77eb77d065105e81155c4d9d3