Executive brief
A vulnerability in the Linux kernel's Multiple Device (MD) driver could allow a local user to crash the system. The issue occurs when the system attempts to retrieve statistics for a RAID storage device while its internal tracking bitmap is being modified or destroyed. This can lead to a kernel panic, resulting in a complete system outage and loss of availability.
Technical details
A race condition exists in the Linux kernel's md-bitmap component due to improper synchronization between bitmap_get_stats() and the bitmap's lifecycle. The function bitmap_get_stats() can be invoked via md_seq_show (e.g., reading /proc/mdstat) even if the bitmap is destroyed or not fully initialized. This leads to a null pointer dereference or general protection fault when the kernel attempts to access bitmap->storage. The vulnerability is triggered locally by reading MD device status. The fix introduces mutex protection using bitmap_info.mutex to ensure the bitmap remains valid during statistics retrieval.
Affected products
- Linux Linux Kernel 2.6.13 to 6.1.130, 6.2 to 6.6.80, 6.7 to 6.12.13, 6.13 to 6.13.2
Timeline
- 2025-01-24: patched: Initial patch submitted by Yu Kuai
- 2025-02-26: advisory: CVE-2025-21712 published by kernel.org
- 2025-02-27: disclosed: NVD publication date
References
- https://git.kernel.org/stable/c/032fa54f486eac5507976e7e31f079a767bc13a8
- https://git.kernel.org/stable/c/237e19519c8ff6949f0ef57c4a0243f5b2b0fa18
- https://git.kernel.org/stable/c/4e9316eee3885bfb311b4759513f2ccf37891c09
- https://git.kernel.org/stable/c/52848a095b55a302af92f52ca0de5b3112059bb8
- 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