CVE-2025-22126
Last modified
CVE-2025-22126 is a high-severity vulnerability rated 7.8/10 on the CVSS scale. 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. EPSS estimates a 0.16% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux Kernel | >= 6.0, < 6.1.135 |
| Linux | Linux Kernel | >= 6.2, < 6.6.88 |
| Linux | Linux Kernel | >= 6.7, < 6.12.25 |
| Linux | Linux Kernel | >= 6.13, < 6.14.2 |
References
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2025-22126?
How severe is CVE-2025-22126?
How do I fix CVE-2025-22126?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2025
- CVE-2025-22120In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-22121In the Linux kernel, the following vulnerability has been re…7.1
- CVE-2025-22122In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-22123In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-22124In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-22125In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-22127In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-22128In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-22129Tuleap is an Open Source Suite to improve management of soft…4.3
- CVE-2025-2213A vulnerability was found in Castlenet CBW383G2N up to 20250…4.8
- CVE-2025-22130Soft Serve is a self-hostable Git server for the command lin…8.8
- CVE-2025-22131PhpSpreadsheet is a PHP library for reading and writing spre…6.1
Are you affected by CVE-2025-22126?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
