CVE-2026-89998 PUBLISHED

dm: fix race when loading and unloading a table

Assigner: Linux
Reserved: 11.09.2026 Published: 16.09.2026 Updated: 16.09.2026

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.

Metrics

CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7.8

AV:L - The race is reached only through local DM_TABLE_LOAD ioctls on /dev/mapper/control (ctl_ioctl → table_load → dm_setup_md_queue walking md->table_devices). No network, Bluetooth, or physical-bus path loads a device-mapper table. AC:L - The attacker issues two concurrent table-load ioctls on a mapped device they created, owning both sides of the race: one load fails after populate_table added devices and dm_table_destroy frees them while the other walks the list. Device-mapper is a standard distro component, not a rare config. PR:L - ctl_ioctl requires capable(CAP_SYS_ADMIN). In the most severe reasonable deployment that capability is held by a container, CSI, or LVM/storage-stack administrator with delegated /dev/mapper/control rather than exclusive host root, matching kernel-CNA scoring of other device-mapper ioctl bugs as Low. UI:N - The attacker performs every step with its own ioctls (DM_DEV_CREATE then concurrent DM_TABLE_LOAD). No separate victim action such as mounting a filesystem or opening a file is required. S:U - The use-after-free of struct table_device stays inside the host kernel's security authority. This is standard kernel memory corruption, not a VM, IOMMU, or sandbox boundary crossing. C:H - dm_setup_md_queue walks md->table_devices and dereferences td->dm_dev.bdev after a concurrent dm_table_destroy has kfree'd the table_device. Reclaiming that slab object yields an arbitrary kernel read, so confidentiality is High. I:H - The same use-after-free lets an attacker spray a replacement object so bd_link_disk_holder writes through an attacker-controlled bdev pointer, a classic heap UAF write and control-flow hijack primitive, so integrity is High. A:H - Walking a freed table_device list entry or calling bd_link_disk_holder on a dangling bdev causes a kernel oops, panic, or hang, which is a complete availability impact.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to b02e35b81176c7d61dd441cc7a2e5c324a82444b (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to 0ea6e5ad4a5817e91f11b4cc1e022e575ed2e7ca (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to a1af1884c960b98c621b6fe2fea1216b78c02152 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to af1f32ccf8051f4691ced11feb452b9d13561727 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to 00ad6f9ed27f91925d4d3fb7aab50a60d774f998 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to 5380c7f6335cc6d77eb77d065105e81155c4d9d3 (excl.)
  • affected from 0 to 6.1.188 (excl.)
  • affected from 0 to 6.6.157 (excl.)
  • affected from 0 to 6.12.110 (excl.)
  • affected from 0 to 6.18.51 (excl.)
  • affected from 0 to 7.2.5 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • unaffected from 6.1.188 to 6.1.* (incl.)
  • unaffected from 6.6.157 to 6.6.* (incl.)
  • unaffected from 6.12.110 to 6.12.* (incl.)
  • unaffected from 6.18.51 to 6.18.* (incl.)
  • unaffected from 7.2.5 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References