# CVE-2025-21712: md/md-bitmap: Synchronize bitmap\_get\_stats() with bitmap lifetime

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-26)
- **Published:** 2025-02-27T02:07:24.354Z
- **Modified:** 2026-10-15T22:18:07.873Z

## Who should check

- Anyone running Linux \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< eb2f9d98cd3e94a79fbf8fb90637c5b12e805428; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 032fa54f486eac5507976e7e31f079a767bc13a8; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 52848a095b55a302af92f52ca0de5b3112059bb8; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 237e19519c8ff6949f0ef57c4a0243f5b2b0fa18; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 4e9316eee3885bfb311b4759513f2ccf37891c09; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 8d28d0ddb986f56920ac97ae704cc3340a699a30
- Anyone running Linux 2.6.13

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

## Affected and fixed versions

- Linux: \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< eb2f9d98cd3e94a79fbf8fb90637c5b12e805428; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 032fa54f486eac5507976e7e31f079a767bc13a8; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 52848a095b55a302af92f52ca0de5b3112059bb8; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 237e19519c8ff6949f0ef57c4a0243f5b2b0fa18; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 4e9316eee3885bfb311b4759513f2ccf37891c09; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 8d28d0ddb986f56920ac97ae704cc3340a699a30 (cvelist)
- Linux: 2.6.13 (cvelist)

## Mitigation

- Upgrade Linux to 8d28d0ddb986f56920ac97ae704cc3340a699a30 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-21712. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21712.md
Affected: Linux >= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, < eb2f9d98cd3e94a79fbf8fb90637c5b12e805428; >= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, < 032fa54f486eac5507976e7e31f079a767bc13a8; >= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, < 52848a095b55a302af92f52ca0de5b3112059bb8; >= 32a7627cf3a35396a8e834f…
Fixed in: Linux 032fa54f486eac5507976e7e31f079a767bc13a8, Linux 52848a095b55a302af92f52ca0de5b3112059bb8, Linux 237e19519c8ff6949f0ef57c4a0243f5b2b0fa18, Linux 4e9316eee3885bfb311b4759513f2ccf37891c09, Linux 8d28d0ddb986f56920ac97ae704cc3340a699a30

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-21712 being exploited?

There is no confirmed exploitation: CVE-2025-21712 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-21712?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-21712?

Linux \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< eb2f9d98cd3e94a79fbf8fb90637c5b12e805428; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 032fa54f486eac5507976e7e31f079a767bc13a8; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 52848a095b55a302af92f52ca0de5b3112059bb8; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 237e19519c8ff6949f0ef57c4a0243f5b2b0fa18; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 4e9316eee3885bfb311b4759513f2ccf37891c09; \>= 32a7627cf3a35396a8e834faf34e38ae9f3b1309, \< 8d28d0ddb986f56920ac97ae704cc3340a699a30; Linux 2.6.13.

### Is there a fix for CVE-2025-21712?

Yes. Fixed in Linux 032fa54f486eac5507976e7e31f079a767bc13a8, Linux 52848a095b55a302af92f52ca0de5b3112059bb8, Linux 237e19519c8ff6949f0ef57c4a0243f5b2b0fa18, Linux 4e9316eee3885bfb311b4759513f2ccf37891c09, Linux 8d28d0ddb986f56920ac97ae704cc3340a699a30. Upgrade Linux to 8d28d0ddb986f56920ac97ae704cc3340a699a30 or later.

### How do I check if I'm affected by CVE-2025-21712?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/032fa54f486eac5507976e7e31f079a767bc13a8>
- patch: <https://git.kernel.org/stable/c/52848a095b55a302af92f52ca0de5b3112059bb8>
- patch: <https://git.kernel.org/stable/c/237e19519c8ff6949f0ef57c4a0243f5b2b0fa18>
- patch: <https://git.kernel.org/stable/c/4e9316eee3885bfb311b4759513f2ccf37891c09>
- patch: <https://git.kernel.org/stable/c/8d28d0ddb986f56920ac97ae704cc3340a699a30>
- other: <https://git.kernel.org/stable/c/eb2f9d98cd3e94a79fbf8fb90637c5b12e805428>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-21712>

HTML: <https://flawdb.com/CVE-2025-21712> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-21712>
