CVE-2025-21712

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

7.8 high EPSS 0.22%

Published 27 Feb 2025 Updated 15 Oct 2026 CNA: Linux

Check your servers for CVE-2025-21712

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-21712 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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.

Severity (CVSS)

7.8 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 13.6% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 15 Oct 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
total: full control of the component or of its data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 32a7627cf3a35396a8e834faf34e38ae9f3b1309, before eb2f9d98cd3e94a79fbf8fb90637c5b12e805428
affected from 32a7627cf3a35396a8e834faf34e38ae9f3b1309, before 032fa54f486eac5507976e7e31f079a767bc13a8
affected from 32a7627cf3a35396a8e834faf34e38ae9f3b1309, before 52848a095b55a302af92f52ca0de5b3112059bb8
affected from 32a7627cf3a35396a8e834faf34e38ae9f3b1309, before 237e19519c8ff6949f0ef57c4a0243f5b2b0fa18
affected from 32a7627cf3a35396a8e834faf34e38ae9f3b1309, before 4e9316eee3885bfb311b4759513f2ccf37891c09
affected from 32a7627cf3a35396a8e834faf34e38ae9f3b1309, before 8d28d0ddb986f56920ac97ae704cc3340a699a30
Other versions: unaffected
Linux
affected 2.6.13
unaffected before 2.6.13
unaffected from 5.15.209 up to and including 5.15.*
unaffected from 6.1.130 up to and including 6.1.*
unaffected from 6.6.80 up to and including 6.6.*
unaffected from 6.12.13 up to and including 6.12.*
unaffected from 6.13.2 up to and including 6.13.*
unaffected 6.14 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-21712 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-21712

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2025-21712
trivy image --scanners vuln IMAGE | grep CVE-2025-21712

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2025-21712 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.