Skip to contentSkip to conversation

CVE-2026-99036: dm: fix reading free memory in do_resume

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 23

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 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.

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

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

	Fixed in 6.6.160 with commit 281f68d6cf8acb2547ebf0a849b8beae8fb0ec3c
	Fixed in 6.12.113 with commit 2c96d1a8324e7736e0f8a5790ecf39d36c2c4a82
	Fixed in 6.18.57 with commit e3bf232c913b7e0103d323f15e6342d37cb1b357
	Fixed in 7.2.11 with commit 301691c32b8ad023e3316d5dbb6a8cf52d47b0dc
	Fixed in 7.3 with commit c9417c1c5269e2bd0570fbe53e4ec03a8d31f008

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-99036

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-ioctl.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/281f68d6cf8acb2547ebf0a849b8beae8fb0ec3c
	https://git.kernel.org/stable/c/2c96d1a8324e7736e0f8a5790ecf39d36c2c4a82
	https://git.kernel.org/stable/c/e3bf232c913b7e0103d323f15e6342d37cb1b357
	https://git.kernel.org/stable/c/301691c32b8ad023e3316d5dbb6a8cf52d47b0dc
	https://git.kernel.org/stable/c/c9417c1c5269e2bd0570fbe53e4ec03a8d31f008