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

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-02-27 · Modified: 2026-10-15
- Aliases: UBUNTU-CVE-2025-21712, DEBIAN-CVE-2025-21712
- Record: https://cvemate.com/vulnerability/CVE-2025-21712 · JSON: https://cvemate.com/vulnerability/CVE-2025-21712/json

## Description

```text
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.
```

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.222%, percentile 13.659%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 142)

- debian linux (Debian): \< 6.1.133-1 \| \< 6.12.13-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-186.196 \| \< 6.8.0-78.78
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1112.119 \| \< 6.8.0-1035.37
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1112.119~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1035.37~22.04.1
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1112.119+fips1
- ubuntu linux-aws-hwe (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1117.126 \| \< 6.8.0-1034.39
- ubuntu linux-azure-4.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 34)

- <https://git.kernel.org/stable/c/eb2f9d98cd3e94a79fbf8fb90637c5b12e805428>
- <https://git.kernel.org/stable/c/032fa54f486eac5507976e7e31f079a767bc13a8>
- <https://git.kernel.org/stable/c/52848a095b55a302af92f52ca0de5b3112059bb8>
- <https://git.kernel.org/stable/c/237e19519c8ff6949f0ef57c4a0243f5b2b0fa18>
- <https://git.kernel.org/stable/c/4e9316eee3885bfb311b4759513f2ccf37891c09>
- <https://git.kernel.org/stable/c/8d28d0ddb986f56920ac97ae704cc3340a699a30>
- <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>
- <https://ubuntu.com/security/CVE-2025-21712>
- <https://www.cve.org/CVERecord?id=CVE-2025-21712>
- <https://git.kernel.org/linus/8d28d0ddb986f56920ac97ae704cc3340a699a30>
- <https://ubuntu.com/security/notices/USN-7521-1>
- <https://ubuntu.com/security/notices/USN-7521-2>
- <https://ubuntu.com/security/notices/USN-7521-3>
- <https://ubuntu.com/security/notices/USN-7703-1>
- <https://ubuntu.com/security/notices/USN-7703-2>
- <https://ubuntu.com/security/notices/USN-7703-3>
- <https://ubuntu.com/security/notices/USN-7719-1>
- <https://ubuntu.com/security/notices/USN-7703-4>
- <https://ubuntu.com/security/notices/USN-7737-1>

---

Data as of 2026-12-05T05:00:12.466Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
