CVE-2026-31579
wireguard: device: use exit_rtnl callback instead of manual rtnl_lock in pre_exit
Reported by linux · Published April 24, 2026
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. ]
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| linux-azure-6.18 | Chainguard | 6.18.31-r0 |
| Linux | Linux | 5.8 |
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 900575aa33a3eaaef802b31de187a85c4a4b4bd0, 900575aa33a3eaaef802b31de187a85c4a4b4bd0, 900575aa33a3eaaef802b31de187a85c4a4b4bd0 |
| Linux | Linux | 5.8, 0, 6.12.114 |
| chainguard | linux-azure-6.18 | 0 |
| Linux | Linux | 7.1, 7.0.1, 6.19.14 |
| linux | linux_kernel | 5.8, 5.8, 5.8 |
| amazon:2023 | kernel6.18-headers | 0 |
| chainguard | linux-qemu-6.18 | 0 |
| amazon:2023 | kernel6.18-devel | 0 |
| amazon:2023 | python3-perf6.18 | 0 |
| amazon:2023 | kernel6.18-tools | 0 |
| amazon:2023 | kernel6.18 | 0 |
| chainguard | linux-aws-6.18 | 0 |
| amazon:2023 | kernel-livepatch-6.18.25-55.108 | 0 |
| amazon:2023 | kernel6.18-tools-devel | 0 |
| amazon:2023 | bpftool6.18 | 0 |
| chainguard | linux-gcp-6.18 | 0 |
| chainguard | linux-vmware-6.18 | 0 |
| amazon:2023 | perf6.18 | 0 |
| amazon:2023 | kernel6.18-modules-extra | 0 |
| amazon:2023 | kernel6.18-modules-extra-common | 0 |
Timeline
- Apr 24, 2026 CVE Published
- Apr 24, 2026 Security Advisory (102 in total, the first dated here)
- May 18, 2026 EPSS Score (25 in total, the first dated here)
- Jul 18, 2026 Coalition ESS Score
- Aug 11, 2026 Distribution Patch (97 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2026-31579
vulnetix vdb fixes CVE-2026-31579
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-31579/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart