CVE-2026-31579·Kernel vulnerability
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. ]
- Severity
- medium
- Software
- Kernel
- Fixed in
- 7.0.1
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.16% — higher than 5% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
From: 7.0
Until: 7.0.1
Fixed in: 7.0.1
How to fix this CVE
Update your Linux kernel to version 7.0.1 or later to resolve a WireGuard device cleanup deadlock that can cause system hangs. This vulnerability affects the network namespace exit path where improper lock handling creates contention windows. Apply the fix through your distribution's standard kernel update mechanism as soon as possible.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Run `uname -r` to check your current kernel version and confirm it is below 7.0.1
- Check if WireGuard is active with `wg show` or verify the wireguard module is loaded via `lsmod | grep wireguard`
- Monitor system logs for hung task warnings related to cleanup_net workqueue: `sudo dmesg | grep -i 'hung task\|cleanup_net'`
- After applying the patch, verify the new kernel version with `uname -r` and confirm it matches or exceeds 7.0.1
FAQ
What is CVE-2026-31579?
This vulnerability is a deadlock condition in the Linux kernel's WireGuard device cleanup routine that occurs when the network namespace exit handler improperly acquires the RTNL lock, causing the system to hang indefinitely if another thread holds the same lock.
Is CVE-2026-31579 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are currently available.
What versions of Kernel are affected by CVE-2026-31579?
Linux kernel versions 7.0 through 7.0.1 are affected; the fix is included in kernel version 7.0.1 and later releases.
How do I check if my server is vulnerable to CVE-2026-31579?
Run `uname -r` to see your kernel version; if it shows 7.0.0 or 7.0, you are vulnerable. Additionally, check if WireGuard is in use with `lsmod | grep wireguard` to determine actual exposure.
Does Defensia detect CVE-2026-31579?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2026-31579 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1c52ef00e391144334f10995985c2f256d4be982
- https://git.kernel.org/stable/c/60a25ef8dacb3566b1a8c4de00572a498e2a3bf9
- https://git.kernel.org/stable/c/707607db2193591b68c0e70f814133472c185b1e
- https://git.kernel.org/stable/c/9a9e69155b2091b8297afaf1533b8d68a3096841
- https://git.kernel.org/stable/c/a1d0f6cbb962af29586e3e65a4bced1a5e39221f
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-31579. Free for 1 server.
Get started free