CVE-2025-40134
kernel: dm: fix NULL pointer dereference in __dm_suspend()
Overview
Description
In the Linux kernel, the following vulnerability has been resolved:
dm: fix NULL pointer dereference in __dm_suspend()
There is a race condition between dm device suspend and table load that
can lead to null pointer dereference. The issue occurs when suspend is
invoked before table load completes:
BUG: kernel NULL pointer dereference, address: 0000000000000054
Oops: 0000 [#1] PREEMPT SMP PTI
CPU: 6 PID: 6798 Comm: dmsetup Not tainted 6.6.0-g7e52f5f0ca9b #62
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.1-2.fc37 04/01/2014
RIP: 0010:blk_mq_wait_quiesce_done+0x0/0x50
Call Trace:
<TASK>
blk_mq_quiesce_queue+0x2c/0x50
dm_stop_queue+0xd/0x20
__dm_suspend+0x130/0x330
dm_suspend+0x11a/0x180
dev_suspend+0x27e/0x560
ctl_ioctl+0x4cf/0x850
dm_ctl_ioctl+0xd/0x20
vfs_ioctl+0x1d/0x50
__se_sys_ioctl+0x9b/0xc0
__x64_sys_ioctl+0x19/0x30
x64_sys_call+0x2c4a/0x4620
do_syscall_64+0x9e/0x1b0
The issue can be triggered as below:
T1 T2
dm_suspend table_load
__dm_suspend dm_setup_md_queue
dm_mq_init_request_queue
blk_mq_init_allocated_queue
=> q->mq_ops = set->ops; (1)
dm_stop_queue / dm_wait_for_completion
=> q->tag_set NULL pointer! (2)
=> q->tag_set = set; (3)
Fix this by checking if a valid table (map) exists before performing
request-based suspend and waiting for target I/O. When map is NULL,
skip these table-dependent suspend steps.
Even when map is NULL, no I/O can reach any target because there is
no table loaded; I/O submitted in this state will fail early in the
DM layer. Skipping the table-dependent suspend logic in this case
is safe and avoids NULL pointer dereferences.
Source: OX vulnerability database
Severity
4.7 · MEDIUM
CVSS 3.1 base score, scored by redhat.
- Attack vector
- Local
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Affected packages · 0
No registry package. This ID affects operating system packages only.
Operating systems · 101 fixes
Oracle Linux 3 releases · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| 7 | kernel-uek +7 | 5.4.17-2136.350.3.1.el7uek |
| 8 | bpftool +13 | 5.15.0-315.196.5.1.el8uek |
| 9 | kernel +28 | 5.14.0-687.17.1.el9_8 |
| 9 | bpftool +18 | 5.15.0-315.196.5.1.el9uek |
Photon OS 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | bpftool +9 | 5.10.246-1.ph4 |
| 5.0 | bpftool +10 | 6.1.157-1.ph5 |
Red Hat 3 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | bpftool +25 | eol | — |
| 8 | bpftool +45 | affected | — |
| 9 | kernel-rt +20 | affected | — |
| 9 | kernel +71 | 0:5.14.0-687.5.1.el9_8 | RHSA-2026:18587 |
SUSE Linux Enterprise 3 releases · 6 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.6 | kernel-livepatch-6-4-0-150600-23-84-default | 1-150600.13.3.1 | SUSE-SU-2026:0293-1 |
| 15.6 | cluster-md-kmp-default +17 | 6.4.0-150600.23.84.1 | SUSE-SU-2026:0293-1 |
| 15.6 | kernel-default-base | 6.4.0-150600.23.84.1.150600.12.38.1 | SUSE-SU-2026:0293-1 |
| 15.7 | kernel-livepatch-6-4-0-150700-7-28-rt | 1-150700.1.3.1 | SUSE-SU-2026:0278-1 |
| 15.7 | kernel-livepatch-6-4-0-150700-53-28-default | 1-150700.15.3.1 | SUSE-SU-2026:0315-1 |
| 15.7 | kernel-azure +4 | 6.4.0-150700.20.24.1 | SUSE-SU-2026:0281-1 |
4 more rows
SUSE Linux Enterprise Micro 3 releases · 4 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 6.0 | kernel-default +5 | 6.4.0-39.1 | SUSE-SU-2026:20477-1 |
| 6.0 | kernel-default-base | 6.4.0-39.1.21.16 | SUSE-SU-2026:20477-1 |
| 6.0 | kernel-devel-rt +3 | 6.4.0-40.1 | SUSE-SU-2026:20845-1 |
| 6.1 | kernel-default +6 | 6.4.0-39.1 | SUSE-SU-2026:20498-1 |
| 6.1 | kernel-default-base | 6.4.0-39.1.21.16 | SUSE-SU-2026:20498-1 |
| 6.1 | kernel-devel-rt +4 | 6.4.0-40.1 | SUSE-SU-2026:20876-1 |
2 more rows
alma 2 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 10 | kernel-abi-stablelists +1 | 6.12.0-211.7.1.el10_2 |
| 9 | kernel +40 | 5.14.0-687.5.1.el9_8 |
amazon linux 1 release · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| 2023 | kernel-livepatch-6-1-156-177-286 +1 | 1:1.0-0.amzn2023 |
| 2023 | bpftool +20 | 1:6.1.156-177.286.amzn2023 |
| 2023 | bpftool6-12 +20 | 1:6.12.53-69.119.amzn2023 |
debian 4 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 11 | linux | 5.10.247-1 |
| 11 | linux-6-1 | 6.1.158-1~deb11u1 |
| 12 | linux | 6.1.158-1 |
| 13 | linux | 6.12.57-1 |
| 14 | linux | 6.17.6-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| linux | 6.12.57-1 |
openSUSE Leap 1 release · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 16.0 | cluster-md-kmp-64kb +64 | 6.12.0-160000.8.1 | openSUSE-SU-2025:20172-1 |
| 16.0 | kernel-default-base | 6.12.0-160000.8.1.160000.2.5 | openSUSE-SU-2025:20172-1 |
root.io debian 3 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 11 | linux +1 | 5.10.247-1 |
| 12 | rootio-linux | 6.1.158-1 |
| 13 | linux +1 | 6.12.57-1 |
root.io ubuntu 2 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 22.04 | rootio-linux | 5.15.0-170.180 |
| 24.04 | linux +1 | 6.8.0-106.106 |
ubuntu 3 releases · 43 packages
| Release | Package | Fixed in |
|---|---|---|
| 20.04-ESM | linux-nvidia-tegra-5-15 | 5.15.0-1052.52~20.04.2 |
| 20.04-ESM | linux-ibm-5-15 | 5.15.0-1094.97~20.04.1 |
| 20.04-ESM | linux-intel-iotg-5-15 | 5.15.0-1095.101~20.04.1 |
| 20.04-ESM | linux-riscv-5-15 | 5.15.0-1095.99~20.04.1 |
| 20.04-ESM | linux-oracle-5-15 | 5.15.0-1097.103~20.04.1 |
| 20.04-ESM | linux-aws-5-15 | 5.15.0-1100.107~20.04.2 |
49 more rows
References
- access.redhat.com https://access.redhat.com/errata/RHSA-2026:18587
- access.redhat.com https://access.redhat.com/security/cve/CVE-2025-40134
- bugzilla.redhat.com https://bugzilla.redhat.com/2360247
- bugzilla.redhat.com https://bugzilla.redhat.com/2367614
- bugzilla.redhat.com https://bugzilla.redhat.com/2373343
- bugzilla.redhat.com https://bugzilla.redhat.com/2376060
- bugzilla.redhat.com https://bugzilla.redhat.com/2376065
- bugzilla.redhat.com https://bugzilla.redhat.com/2379178
- bugzilla.redhat.com https://bugzilla.redhat.com/2383397
- bugzilla.redhat.com https://bugzilla.redhat.com/2383399
Show all 60 references
- bugzilla.redhat.com https://bugzilla.redhat.com/2383478
- bugzilla.redhat.com https://bugzilla.redhat.com/2383906
- bugzilla.redhat.com https://bugzilla.redhat.com/2396940
- bugzilla.redhat.com https://bugzilla.redhat.com/2414468
- bugzilla.redhat.com https://bugzilla.redhat.com/2436806
- bugzilla.redhat.com https://bugzilla.redhat.com/2448594
- errata.almalinux.org https://errata.almalinux.org/9/ALSA-2026-18587.html
- git.kernel.org https://git.kernel.org/linus/8d33a030c566e1f105cd5bf27f37940b6367f3be (6.18-rc1)
- git.kernel.org https://git.kernel.org/stable/c/19ca4528666990be376ac3eb6fe667b03db5324d
- git.kernel.org https://git.kernel.org/stable/c/30f95b7eda5966b81cb221bd569c0f095a068cf6
- git.kernel.org https://git.kernel.org/stable/c/331c2dd8ca8bad1a3ac10cce847ffb76158eece4
- git.kernel.org https://git.kernel.org/stable/c/846cafc4725ca727d94f9c4b5f789c1a7c8fb6fe
- git.kernel.org https://git.kernel.org/stable/c/8d33a030c566e1f105cd5bf27f37940b6367f3be
- git.kernel.org https://git.kernel.org/stable/c/9dc43ea6a20ff83fe9a5fe4be47ae0fbf2409b98
- git.kernel.org https://git.kernel.org/stable/c/a0e54bd8d7ea79127fe9920df3ae36f85e79ac7c
- git.kernel.org https://git.kernel.org/stable/c/a802901b75e13cc306f1b7ab0f062135c8034e9e
- linux.oracle.com https://linux.oracle.com/cve/CVE-2025-40134.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2026-18587.html
- lore.kernel.org https://lore.kernel.org/linux-cve-announce/2025111254-CVE-2025-40134-4d24@gregkh/T
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2025-40134
- ubuntu.com https://ubuntu.com/security/notices/USN-8029-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8029-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8029-3
- ubuntu.com https://ubuntu.com/security/notices/USN-8030-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8033-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8033-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8033-3
- ubuntu.com https://ubuntu.com/security/notices/USN-8033-4
- ubuntu.com https://ubuntu.com/security/notices/USN-8033-5
- ubuntu.com https://ubuntu.com/security/notices/USN-8033-6
- ubuntu.com https://ubuntu.com/security/notices/USN-8033-7
- ubuntu.com https://ubuntu.com/security/notices/USN-8033-8
- ubuntu.com https://ubuntu.com/security/notices/USN-8034-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8034-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8048-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-3
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-4
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-5
- ubuntu.com https://ubuntu.com/security/notices/USN-8100-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8125-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8126-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8141-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8163-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8163-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8165-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8243-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8261-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2025-40134
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.