CVE-2026-31579
Last modified
CVE-2026-31579 is a medium-severity vulnerability rated 5.5/10 on the CVSS scale. In the Linux kernel, the following vulnerability has been resolved: wireguard: device: use exit_rtnl callback instead of manual rtnl_lock in pre_exit wg_netns_pre_exit() manually acquires rtnl_lock() inside the pernet .pre_exit callback. This causes a hung task when another thread holds rtnl_mutex - the cleanup_net workqueue (or the setup_net failure rollback path) blocks indefinitely in wg_netns_pre_exit() waiting to acquire the lock. Convert to .exit_rtnl, introduced in commit 7a60d91c690b ("net: Add ->exit_rtnl() hook to struct pernet_operations."), where the framework already holds RTNL and batches all callbacks under a single rtnl_lock()/rtnl_unlock() pair, eliminating the contention window. The rcu_assign_pointer(wg->creating_net, NULL) is safe to move from .pre_exit to .exit_rtnl (which runs after synchronize_rcu()) because all RCU readers of creating_net either use maybe_get_net() - which returns NULL for a dying namespace with zero refcount - or access net->user_ns which remains valid throughout the entire ops_undo_list sequence. [ Jason: added __net_exit and __read_mostly annotations that were missing. EPSS estimates a 0.12% chance of exploitation in the next 30 days.
Description
In the Linux kernel, the following vulnerability has been resolved: wireguard: device: use exit_rtnl callback instead of manual rtnl_lock in pre_exit wg_netns_pre_exit() manually acquires rtnl_lock() inside the pernet .pre_exit callback. This causes a hung task when another thread holds rtnl_mutex - the cleanup_net workqueue (or the setup_net failure rollback path) blocks indefinitely in wg_netns_pre_exit() waiting to acquire the lock. Convert to .exit_rtnl, introduced in commit 7a60d91c690b ("net: Add ->exit_rtnl() hook to struct pernet_operations."), where the framework already holds RTNL and batches all callbacks under a single rtnl_lock()/rtnl_unlock() pair, eliminating the contention window. The rcu_assign_pointer(wg->creating_net, NULL) is safe to move from .pre_exit to .exit_rtnl (which runs after synchronize_rcu()) because all RCU readers of creating_net either use maybe_get_net() - which returns NULL for a dying namespace with zero refcount - or access net->user_ns which remains valid throughout the entire ops_undo_list sequence. [ Jason: added __net_exit and __read_mostly annotations that were missing. ]
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux Kernel | < 6.18.24 |
| Linux | Linux Kernel | >= 6.19, < 6.19.14 |
| Linux | Linux Kernel | >= 7.0, < 7.0.1 |
References
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2026-31579?
How severe is CVE-2026-31579?
How do I fix CVE-2026-31579?
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 2026
- CVE-2026-31573In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31574In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31575In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31576In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-31577In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31578In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-3158IBM Sterling B2B Integrator 6.2.0.0 through 6.2.0.5_2, 6.2.1…4.3
- CVE-2026-31580In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-31581In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-31582In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-31583In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-31584In the Linux kernel, the following vulnerability has been re…7.8
Are you affected by CVE-2026-31579?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
