VDB

CVE-2025-21712

CVE-2025-21712 PUBLISHED CVSS 7.8 HIGH

md/md-bitmap: Synchronize bitmap_get_stats() with bitmap lifetime

Reported by linux · Published February 27, 2025

In the Linux kernel, the following vulnerability has been resolved: md/md-bitmap: Synchronize bitmap_get_stats() with bitmap lifetime After commit ec6bb299c7c3 ("md/md-bitmap: add 'sync_size' into struct md_bitmap_stats"), following panic is reported: Oops: general protection fault, probably for non-canonical address RIP: 0010:bitmap_get_stats+0x2b/0xa0 Call Trace: <TASK> md_seq_show+0x2d2/0x5b0 seq_read_iter+0x2b9/0x470 seq_read+0x12f/0x180 proc_reg_read+0x57/0xb0 vfs_read+0xf6/0x380 ksys_read+0x6c/0xf0 do_syscall_64+0x82/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e Root cause is that bitmap_get_stats() can be called at anytime if mddev is still there, even if bitmap is destroyed, or not fully initialized. Deferenceing bitmap in this case can crash the kernel. Meanwhile, the above commit start to deferencing bitmap->storage, make the problem easier to trigger. Fix the problem by protecting bitmap_get_stats() with bitmap_info.mutex.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel-libbpf-staticAmazon Linux6.1.130-139.222.amzn2023
python3-perfAmazon Linux6.1.130-139.222.amzn2023
linux_kernellinux6.14, 6.13.2, 6.12.13, 6.6.80

Risk scores

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

Affected products

VendorProductVersions
LinuxLinux32a7627cf3a35396a8e834faf34e38ae9f3b1309, 32a7627cf3a35396a8e834faf34e38ae9f3b1309, 32a7627cf3a35396a8e834faf34e38ae9f3b1309
LinuxLinux2.6.13, 0, 5.15.209
amazon:2023kernel-libbpf-static0
amazon:2023python3-perf0
SiemensSIPLUS S7-1500 CPU 1518-4 PN/DP MFP3.1.5
linuxlinux_kernel2.6.13, 2.6.13, 2.6.13
amazon:2023kernel-libbpf-devel0
amazon:2023kernel-tools-devel0
amazon:2023kernel-devel0
amazon:2023bpftool0
amazon:2023kernel-livepatch-6.1.130-139.2220
amazon:2023kernel-modules-extra0
amazon:2023kernel-libbpf0
LinuxLinux5.15.209, 6.1.130, 6.6.80
amazon:2023kernel0
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP3.1.5
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFP3.1.5
amazon:2023kernel-headers0
amazon:2023kernel-modules-extra-common0
amazon:2023perf0

…and 1 more

Timeline

  • Feb 26, 2025 CVE Published
  • Feb 27, 2025 EPSS Score (30 in total, the first dated here)
  • Feb 28, 2025 Coalition ESS Score (21 in total, the first dated here)
  • Dec 18, 2025 PoC Published
  • Dec 22, 2025 Security Advisory (374 in total, the first dated here)
  • Apr 29, 2026 Distribution Patch (327 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2025-21712
vulnetix vdb fixes CVE-2025-21712

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-21712/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›