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

Published Feb 27, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

md/md-bitmap: Synchronize bitmapgetstats() with bitmap lifetime

After commit ec6bb299c7c3 ("md/md-bitmap: add 'syncsize' into struct mdbitmapstats"), following panic is reported:

Oops: general protection fault, probably for non-canonical address RIP: 0010:bitmapgetstats+0x2b/0xa0 Call Trace: <TASK> mdseqshow+0x2d2/0x5b0 seqreaditer+0x2b9/0x470 seqread+0x12f/0x180 procregread+0x57/0xb0 vfsread+0xf6/0x380 ksysread+0x6c/0xf0 dosyscall64+0x82/0x170 entrySYSCALL64afterhwframe+0x76/0x7e

Root cause is that bitmapgetstats() 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 bitmapgetstats() with bitmapinfo.mutex.

Affected Software

216 affected componentsFixes available
Linux Kernel
Microsoft cbl2 kernel 5.15.186.1-1
Linux Linux kernel>=2.6.13<6.1.130
Linux Linux kernel>=6.2<6.6.80
Linux Linux kernel>=6.7<6.12.13
Linux Linux kernel>=6.13<6.13.2
ubuntu/linux*
ubuntu/linux-aws*
ubuntu/linux-azure*
ubuntu/linux-lts-xenial*
ubuntu/linux*
ubuntu/linux-aws*
ubuntu/linux-aws-hwe*
ubuntu/linux-azure*
ubuntu/linux-gcp*
ubuntu/linux-hwe*
ubuntu/linux-hwe-edge*
ubuntu/linux-kvm*
ubuntu/linux-oracle*
ubuntu/linux-fips*
ubuntu/linux-fips*
ubuntu/linux*
ubuntu/linux-aws*
ubuntu/linux-aws-5.0*
ubuntu/linux-aws-5.3*
ubuntu/linux-aws-5.4*
ubuntu/linux-azure*
ubuntu/linux-azure-4.15*
ubuntu/linux-azure-5.3*
ubuntu/linux-azure-5.4*
ubuntu/linux-azure-edge*
ubuntu/linux-gcp*
ubuntu/linux-gcp-4.15*
ubuntu/linux-gcp-5.3*
ubuntu/linux-gcp-5.4*
ubuntu/linux-gke-4.15*
ubuntu/linux-gke-5.4*
ubuntu/linux-gkeop-5.4*
ubuntu/linux-hwe*
ubuntu/linux-hwe-5.4*
ubuntu/linux-hwe-edge*
ubuntu/linux-ibm-5.4*
ubuntu/linux-kvm*
ubuntu/linux-oem*
ubuntu/linux-oracle*
ubuntu/linux-oracle-5.0*
ubuntu/linux-oracle-5.3*
ubuntu/linux-oracle-5.4*
ubuntu/linux-raspi-5.4*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux*
ubuntu/linux-aws*
ubuntu/linux-aws-5.11*
ubuntu/linux-aws-5.13*
ubuntu/linux-aws-5.15<5.15.0-1112.119~20.04.1
5.15.0-1112.119~20.04.1
ubuntu/linux-aws-5.8*
ubuntu/linux-azure*
ubuntu/linux-azure-5.11*
ubuntu/linux-azure-5.13*
ubuntu/linux-azure-5.15<5.15.0-1117.126~20.04.1
5.15.0-1117.126~20.04.1
ubuntu/linux-azure-5.8*
ubuntu/linux-azure-fde*
ubuntu/linux-azure-fde-5.15<5.15.0-1117.126~20.04.2
5.15.0-1117.126~20.04.2
ubuntu/linux-bluefield*
ubuntu/linux-gcp*
ubuntu/linux-gcp-5.11*
ubuntu/linux-gcp-5.13*
ubuntu/linux-gcp-5.15<5.15.0-1112.122~20.04.1
5.15.0-1112.122~20.04.1
ubuntu/linux-gcp-5.8*
ubuntu/linux-gke*
ubuntu/linux-gke-5.15*
ubuntu/linux-gkeop*
ubuntu/linux-gkeop-5.15*
ubuntu/linux-hwe-5.11*
ubuntu/linux-hwe-5.13*
ubuntu/linux-hwe-5.15<5.15.0-186.196~20.04.1
5.15.0-186.196~20.04.1
ubuntu/linux-hwe-5.8*
ubuntu/linux-ibm*
ubuntu/linux-ibm-5.15<5.15.0-1106.110~20.04.1
5.15.0-1106.110~20.04.1
ubuntu/linux-intel-5.13*
ubuntu/linux-intel-iotg-5.15<5.15.0-1107.113~20.04.1
5.15.0-1107.113~20.04.1
ubuntu/linux-iot*
ubuntu/linux-kvm*
ubuntu/linux-lowlatency-hwe-5.15<5.15.0-184.194~20.04.1
5.15.0-184.194~20.04.1
ubuntu/linux-nvidia-tegra-5.15<5.15.0-1064.66~20.04.1
5.15.0-1064.66~20.04.1
ubuntu/linux-oem-5.10*
ubuntu/linux-oem-5.13*
ubuntu/linux-oem-5.6*
ubuntu/linux-oracle*
ubuntu/linux-oracle-5.11*
ubuntu/linux-oracle-5.13*
ubuntu/linux-oracle-5.15<5.15.0-1109.115~20.04.1
5.15.0-1109.115~20.04.1
ubuntu/linux-oracle-5.8*
ubuntu/linux-raspi*
ubuntu/linux-raspi2*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.11*
ubuntu/linux-riscv-5.15<5.15.0-1106.110~20.04.1
5.15.0-1106.110~20.04.1
ubuntu/linux-riscv-5.8*
ubuntu/linux-xilinx-zynqmp*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux<5.15.0-186.196
5.15.0-186.196
ubuntu/linux-allwinner-5.19*
ubuntu/linux-aws<5.15.0-1112.119
5.15.0-1112.119
ubuntu/linux-aws-5.19*
ubuntu/linux-aws-6.2*
ubuntu/linux-aws-6.5*
ubuntu/linux-aws-6.8<6.8.0-1035.37~22.04.1
6.8.0-1035.37~22.04.1
ubuntu/linux-azure<5.15.0-1117.126
5.15.0-1117.126
ubuntu/linux-azure-5.19*
ubuntu/linux-azure-6.2*
ubuntu/linux-azure-6.5*
ubuntu/linux-azure-6.8<6.8.0-1034.39~22.04.1
6.8.0-1034.39~22.04.1
ubuntu/linux-azure-fde<5.15.0-1117.126
5.15.0-1117.126
ubuntu/linux-azure-fde-5.19*
ubuntu/linux-azure-fde-6.2*
ubuntu/linux-gcp<5.15.0-1112.122
5.15.0-1112.122
ubuntu/linux-gcp-5.19*
ubuntu/linux-gcp-6.2*
ubuntu/linux-gcp-6.5*
ubuntu/linux-gcp-6.8<6.8.0-1036.38~22.04.1
6.8.0-1036.38~22.04.1
ubuntu/linux-gke<5.15.0-1108.114
5.15.0-1108.114
ubuntu/linux-gkeop<5.15.0-1095.103
5.15.0-1095.103
ubuntu/linux-hwe-5.19*
ubuntu/linux-hwe-6.2*
ubuntu/linux-hwe-6.5*
ubuntu/linux-hwe-6.8<6.8.0-78.78~22.04.1
6.8.0-78.78~22.04.1
ubuntu/linux-ibm<5.15.0-1106.110
5.15.0-1106.110
ubuntu/linux-ibm-6.8<6.8.0-1033.33~22.04.1
6.8.0-1033.33~22.04.1
ubuntu/linux-intel-iot-realtime*
ubuntu/linux-intel-iotg<5.15.0-1107.113
5.15.0-1107.113
ubuntu/linux-kvm<5.15.0-1104.109
5.15.0-1104.109
ubuntu/linux-lowlatency<5.15.0-184.194
5.15.0-184.194
ubuntu/linux-lowlatency-hwe-5.19*
ubuntu/linux-lowlatency-hwe-6.2*
ubuntu/linux-lowlatency-hwe-6.5*
ubuntu/linux-lowlatency-hwe-6.8<6.8.0-78.78.1~22.04.1
6.8.0-78.78.1~22.04.1
ubuntu/linux-nvidia<5.15.0-1107.108
5.15.0-1107.108
ubuntu/linux-nvidia-6.2*
ubuntu/linux-nvidia-6.5*
ubuntu/linux-nvidia-6.8<6.8.0-1035.38~22.04.1
6.8.0-1035.38~22.04.1
ubuntu/linux-nvidia-tegra<5.15.0-1064.66
5.15.0-1064.66
ubuntu/linux-nvidia-tegra-igx<5.15.0-1053.53
5.15.0-1053.53
ubuntu/linux-oem-5.17*
ubuntu/linux-oem-6.0*
ubuntu/linux-oem-6.1*
ubuntu/linux-oem-6.5*
ubuntu/linux-oracle<5.15.0-1109.115
5.15.0-1109.115
ubuntu/linux-oracle-6.5*
ubuntu/linux-oracle-6.8<6.8.0-1032.33~22.04.1
6.8.0-1032.33~22.04.1
ubuntu/linux-raspi<5.15.0-1106.109
5.15.0-1106.109
ubuntu/linux-realtime*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.19*
ubuntu/linux-riscv-6.5*
ubuntu/linux-riscv-6.8<6.8.0-78.78~22.04.1
6.8.0-78.78~22.04.1
ubuntu/linux-starfive-5.19*
ubuntu/linux-starfive-6.2*
ubuntu/linux-starfive-6.5*
ubuntu/linux-xilinx-zynqmp<5.15.0-1075.79
5.15.0-1075.79
ubuntu/linux-bluefield<5.15.0-1096.98
5.15.0-1096.98
ubuntu/linux-intel-iot-realtime<5.15.0-1104.106
5.15.0-1104.106
ubuntu/linux-realtime<5.15.0-1111.120
5.15.0-1111.120
ubuntu/linux-realtime-6.8<6.8.1-1030.31~22.04.1
6.8.1-1030.31~22.04.1
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-aws-fips<5.15.0-1112.119+fips1
5.15.0-1112.119+fips1
ubuntu/linux-azure-fips<5.15.0-1117.126+fips1
5.15.0-1117.126+fips1
ubuntu/linux-fips<5.15.0-186.196+fips1
5.15.0-186.196+fips1
ubuntu/linux-gcp-fips<5.15.0-1112.122+fips1
5.15.0-1112.122+fips1
ubuntu/linux<6.8.0-78.78
6.8.0-78.78
ubuntu/linux-aws<6.8.0-1035.37
6.8.0-1035.37
ubuntu/linux-azure<6.8.0-1034.39
6.8.0-1034.39
ubuntu/linux-azure-6.11<6.11.0-1015.15~24.04.1
6.11.0-1015.15~24.04.1
ubuntu/linux-azure-nvidia<6.8.0-1022.23
6.8.0-1022.23
ubuntu/linux-gcp<6.8.0-1036.38
6.8.0-1036.38
ubuntu/linux-gcp-6.11<6.11.0-1015.15~24.04.1
6.11.0-1015.15~24.04.1
ubuntu/linux-gke<6.8.0-1032.36
6.8.0-1032.36
ubuntu/linux-gkeop<6.8.0-1019.21
6.8.0-1019.21
ubuntu/linux-hwe-6.11<6.11.0-26.26~24.04.1
6.11.0-26.26~24.04.1
ubuntu/linux-ibm<6.8.0-1033.33
6.8.0-1033.33
ubuntu/linux-intel*
ubuntu/linux-lowlatency<6.8.0-78.78.1
6.8.0-78.78.1
ubuntu/linux-lowlatency-hwe-6.11<6.11.0-1014.15~24.04.1
6.11.0-1014.15~24.04.1
ubuntu/linux-nvidia<6.8.0-1035.38
6.8.0-1035.38
ubuntu/linux-nvidia-6.11<6.11.0-1010.10
6.11.0-1010.10
ubuntu/linux-nvidia-lowlatency<6.8.0-1035.38.1
6.8.0-1035.38.1
ubuntu/linux-nvidia-tegra<6.8.0-1009.9
6.8.0-1009.9
ubuntu/linux-oem-6.11<6.11.0-1022.22
6.11.0-1022.22
ubuntu/linux-oem-6.8*
ubuntu/linux-oracle<6.8.0-1032.33
6.8.0-1032.33
ubuntu/linux-raspi<6.8.0-1035.39
6.8.0-1035.39
ubuntu/linux-raspi-realtime*
ubuntu/linux-realtime*
ubuntu/linux-riscv*
ubuntu/linux-xilinx<6.8.0-1017.18
6.8.0-1017.18
ubuntu/linux-raspi-realtime<6.8.0-2028.29
6.8.0-2028.29
ubuntu/linux-realtime<6.8.1-1030.31
6.8.1-1030.31
ubuntu/linux-fips<6.8.0-78.78+fips1
6.8.0-78.78+fips1
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Linux kernel (md/md-bitmap) to a version that resolves this vulnerability.

    Patch ec6bb299c7c3
  2. Configuration

    Protect bitmap_get_stats() with bitmap_info.mutex to synchronize it with bitmap lifetime (md/md-bitmap: Synchronize bitmap_get_stats() with bitmap lifetime).

    md/md-bitmap bitmap_get_stats() bitmap_info.mutex = protected/locked around bitmap_get_stats()

Event History

Feb 27, 2025
CVE Published
via MITRE·02:07 AM
Data Sourced
via MITRE·02:07 AM
DescriptionSeverity
Data Sourced
via OSV·02:15 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·02:15 AM
RemedyDescriptionSeverityAffected Software
Oct 25, 2025
Data Sourced
via Microsoft·01:02 AM
DescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2025-21712?

CVE-2025-21712 is classified as a medium severity vulnerability in the Linux kernel.

2

How do I fix CVE-2025-21712?

To fix CVE-2025-21712, update your Linux kernel to the latest patched version.

3

What software is affected by CVE-2025-21712?

CVE-2025-21712 affects the Linux kernel, specifically in the md/md-bitmap functionality.

4

What type of vulnerability is CVE-2025-21712?

CVE-2025-21712 is a general protection fault vulnerability that can lead to system crashes.

5

What is the impact of CVE-2025-21712?

The impact of CVE-2025-21712 may include system instability and potential denial of service due to kernel panics.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203