CVE-2025-21712
Medium · 5.5CVSS
5.5
EPSS
0.2%
Published
Feb 27, 2025
CISA due date
—
Cloudanix analysis
A flaw in core system handling can cause computers to crash suddenly during normal operations.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- OS kernel
- Class
- Race Condition
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability allows bitmap_get_stats() to dereference a bitmap structure that has been destroyed or not fully initialized, leading to a general protection fault and kernel panic when mddev remains present.
Why it matters to the business
Causes unexpected system crashes and denial of service on affected Linux-based systems, with the issue reported over 600 days ago and showing stable low exploitation probability.
How an attack unfolds
A local attacker triggers md_seq_show which invokes bitmap_get_stats after bitmap destruction or incomplete initialization; related threat actor activity around similar Linux kernel privilege escalation issues can be monitored for context.
How to fix it
Apply the synchronization fix using bitmap_info.mutex in bitmap_get_stats; for octavia deployments update to version 3.1.0.
How to confirm the fix worked
Verify the mutex protection is present in bitmap_get_stats, test md bitmap operations post-update, and confirm absence of general protection faults in kernel logs during stats queries.
Typical attack path
- Obtain local user access on the target system
- Perform operations that destroy or delay bitmap initialization while mddev persists
- Invoke paths calling bitmap_get_stats via seq_read or proc interfaces
- Trigger dereference of invalid bitmap storage resulting in kernel panic
How to detect it
Search system logs for general protection faults and call traces involving bitmap_get_stats and md_seq_show; correlate with processes accessing md bitmap statistics.
What your security team should do
- Prioritize patching affected kernels or upgrading octavia to 3.1.0
- Monitor kernel logs for bitmap_get_stats related oops messages
- Limit local access where possible until remediation is complete
The record
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 packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | linux | 0 | No fix |
| Debian:11 | linux-6.1 | 0 | 6.1.137-1~deb11u1 |
| Debian:12 | linux | 0 | No fix |
| Debian:12 | linux | 0 | 6.1.133-1 |
| Debian:13 | linux | 0 | No fix |
| Debian:13 | linux | 0 | 6.12.13-1 |
| Linux | Kernel | 2.6.13 | 6.1.130 |
| Ubuntu:24.10 | linux-aws | 0 | 6.11.0-1014.15 |
Related vulnerabilities
- CVE-2025-39885 In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix recursive… Also affects linux
- CVE-2025-39883 In the Linux kernel, the following vulnerability has been resolved: mm/memory-failure… Also affects linux
- CVE-2025-39876 In the Linux kernel, the following vulnerability has been resolved: net: fec: Fix… Also affects linux
- CVE-2025-39869 In the Linux kernel, the following vulnerability has been resolved: dmaengine: ti: edma… Also affects linux
- CVE-2025-39873 In the Linux kernel, the following vulnerability has been resolved: can: xilinx_can… Also affects linux
- CVE-2025-39863 In the Linux kernel, the following vulnerability has been resolved: wifi: brcmfmac: fix… Also affects linux
- CVE-2025-39865 In the Linux kernel, the following vulnerability has been resolved: tee: fix NULL pointer… Also affects linux
- CVE-2025-39866 In the Linux kernel, the following vulnerability has been resolved: fs: writeback: fix… Also affects linux