# CVE-2025-21712: md/md-bitmap: Synchronize bitmap_get_stats() with bitmap lifetime

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 13% of CVEs (2026-12-01)
- Published: 2025-02-27T02:07:24.354Z
- Modified: 2026-10-15T22:18:07.873Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from 32a7627cf3a35396a8e834faf34e38ae9f3b1309 before eb2f9d98cd3e94a79fbf8fb90637c5b12e805428; from 32a7627cf3a35396a8e834faf34e38ae9f3b1309 before 032fa54f486eac5507976e7e31f079a767bc13a8; from 32a7627cf3a35396a8e834faf34e38ae9f3b1309 before 52848a095b55a302af92f52ca0de5b3112059bb8; from 32a7627cf3a35396a8e834faf34e38ae9f3b1309 before 237e19519c8ff6949f0ef57c4a0243f5b2b0fa18; from 32a7627cf3a35396a8e834faf34e38ae9f3b1309 before 4e9316eee3885bfb311b4759513f2ccf37891c09; from 32a7627cf3a35396a8e834faf34e38ae9f3b1309 before 8d28d0ddb986f56920ac97ae704cc3340a699a30; 2.6.13 (not affected: before 2.6.13; from 5.15.209 up to 5.15.*; from 6.1.130 up to 6.1.*; from 6.6.80 up to 6.6.*; from 6.12.13 up to 6.12.*; from 6.13.2 up to 6.13.*; from 6.14 up to *)
- linux linux_kernel: from 2.6.13 before 6.1.130; from 6.2 before 6.6.80; from 6.7 before 6.12.13; from 6.13 before 6.13.2

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/eb2f9d98cd3e94a79fbf8fb90637c5b12e805428>
- <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> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>

## Sources

- CVE List: [CVE-2025-21712](https://www.cve.org/CVERecord?id=CVE-2025-21712), CVE Terms of Use, modified 2026-10-15
- NVD: [CVE-2025-21712](https://nvd.nist.gov/vuln/detail/CVE-2025-21712), Public domain, modified 2026-10-15

---

Page: https://cve.day/CVE-2025-21712 · Whole record: https://cve.day/CVE-2025-21712.json · Rebuilt by cve.day 2026-11-25T22:58:54.485Z
