CVE-2025-22126
md: fix mddev uaf while iterating all_mddevs list
Mitigation
- Upgrade Linux to 8542870237c3a48ff049b6c5df5f50c8728284fa or later.
Who should check
- Anyone running Linux >= f26514342255855f4ca3c0a92cb1cdea01c33004, < ca9f84de76723b358dfc0606668efdca54afc2e5; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < d69a23d8e925f8052d657652a6875ec2712c7e33; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < e2a9f73ee408a460f4c9dfe03b4741d6b11652b8; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < 5462544ccbad3fc938a71b01fa5bd3a0dc2b750a; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < 8542870237c3a48ff049b6c5df5f50c8728284fa
- Anyone running Linux 6.0
Vulnerability facts
- Affected
- Linux >= f26514342255855f4ca3c0a92cb1cdea01c33004, < ca9f84de76723b358dfc0606668efdca54afc2e5; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < d69a23d8e925f8052d657652a6875ec2712c7e33; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < e2a9f73ee408a460f4c9dfe03b4741d6b11652b8; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < 5462544ccbad3fc938a71b01fa5bd3a0dc2b750a; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < 8542870237c3a48ff049b6c5df5f50c8728284fa; Linux 6.0
- Fixed in
- Linux 5462544ccbad3fc938a71b01fa5bd3a0dc2b750a, Linux 8542870237c3a48ff049b6c5df5f50c8728284fa
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.31% chance of exploitation in 30 days (percentile 16, 2026-11-26)
- CWE
- CWE-416
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: md: fix mddev uaf while iterating all_mddevs list While iterating all_mddevs list from md_notify_reboot() and md_exit(), list_for_each_entry_safe is used, and this can race with deletint the next mddev, causing UAF: t1: spin_lock //list_for_each_entry_safe(mddev, n, ...) mddev_get(mddev1) // assume mddev2 is the next entry spin_unlock t2: //remove mddev2 ... mddev_free spin_lock list_del spin_unlock kfree(mddev2) mddev_put(mddev1) spin_lock //continue dereference mddev2->all_mddevs The old helper for_each_mddev() actually grab the reference of mddev2 while holding the lock, to prevent from being freed. This problem can be fixed the same way, however, the code will be complex. Hence switch to use list_for_each_entry, in this case mddev_put() can free the mddev1 and it's not safe as well. Refer to md_seq_show(), also factor out a helper mddev_put_locked() to fix this problem.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= f26514342255855f4ca3c0a92cb1cdea01c33004, < ca9f84de76723b358dfc0606668efdca54afc2e5; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < d69a23d8e925f8052d657652a6875ec2712c7e33; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < e2a9f73ee408a460f4c9dfe03b4741d6b11652b8; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < 5462544ccbad3fc938a71b01fa5bd3a0dc2b750a; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < 8542870237c3a48ff049b6c5df5f50c8728284fa | — | cvelist |
| Linux | 6.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-22126. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-22126.md Affected: Linux >= f26514342255855f4ca3c0a92cb1cdea01c33004, < ca9f84de76723b358dfc0606668efdca54afc2e5; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < d69a23d8e925f8052d657652a6875ec2712c7e33; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < e2a9f73ee408a460f4c9dfe03b4741d6b11652b8; >= f26514342255855f4ca3c0a… Fixed in: Linux 5462544ccbad3fc938a71b01fa5bd3a0dc2b750a, Linux 8542870237c3a48ff049b6c5df5f50c8728284fa Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/ca9f84de76723b358dfc0606668efdca54afc2e5
- https://git.kernel.org/stable/c/d69a23d8e925f8052d657652a6875ec2712c7e33
- https://git.kernel.org/stable/c/e2a9f73ee408a460f4c9dfe03b4741d6b11652b8
- https://git.kernel.org/stable/c/5462544ccbad3fc938a71b01fa5bd3a0dc2b750a
- https://git.kernel.org/stable/c/8542870237c3a48ff049b6c5df5f50c8728284fa
FAQ
Is CVE-2025-22126 being exploited?
There is no confirmed exploitation: CVE-2025-22126 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-22126?
High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-22126?
Linux >= f26514342255855f4ca3c0a92cb1cdea01c33004, < ca9f84de76723b358dfc0606668efdca54afc2e5; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < d69a23d8e925f8052d657652a6875ec2712c7e33; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < e2a9f73ee408a460f4c9dfe03b4741d6b11652b8; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < 5462544ccbad3fc938a71b01fa5bd3a0dc2b750a; >= f26514342255855f4ca3c0a92cb1cdea01c33004, < 8542870237c3a48ff049b6c5df5f50c8728284fa; Linux 6.0.
Is there a fix for CVE-2025-22126?
Yes. Fixed in Linux 5462544ccbad3fc938a71b01fa5bd3a0dc2b750a, Linux 8542870237c3a48ff049b6c5df5f50c8728284fa. Upgrade Linux to 8542870237c3a48ff049b6c5df5f50c8728284fa or later.
How do I check if I'm affected by CVE-2025-22126?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.