CVE-2026-31516·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: xfrm: prevent policy_hthresh.work from racing with netns teardown A XFRM_MSG_NEWSPDINFO request can queue the per-net work item policy_hthresh.work onto the system workqueue. The queued callback, xfrm_hash_rebuild(), retrieves the enclosing struct net via container_of(). If the net namespace is torn down before that work runs, the associated struct net may already have been freed, and xfrm_hash_rebuild() may then dereference stale memory. xfrm_policy_fini() already flushes policy_hash_work during teardown, but it does not synchronize policy_hthresh.work. Synchronize policy_hthresh.work in xfrm_policy_fini() as well, so the queued work cannot outlive the net namespace teardown and access a freed struct net.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.19.11
- 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.14% — higher than 3% 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.
Read the two together. CVE-2026-31516 scores 7.8 on CVSS, so a successful attack would be serious — but at 0.14%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 6.19
Until: 6.19.11
Fixed in: 6.19.11
How to fix this CVE
Update your Linux kernel to version 6.19.11 or later to resolve a use-after-free vulnerability in the XFRM (IPsec) subsystem. The flaw occurs when network namespace teardown races with queued policy hash rebuild operations, potentially causing kernel memory corruption. Prioritize this update for systems using kernel versions 6.19.0 through 6.19.10, especially those relying on IPsec/XFRM for VPN or tunneling workloads.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check current kernel version: uname -r | grep -oP '6\.19\.\K[0-9]+' — if the patch level is below 11, your system is vulnerable
- Verify XFRM/IPsec modules are loaded: lsmod | grep xfrm — presence of xfrm modules indicates the vulnerable code path is active
- Monitor for namespace teardown errors in kernel logs: sudo dmesg | grep -i 'use-after-free\|xfrm\|policy' — watch for memory access violations during network namespace cleanup
- Confirm patch application after reboot: uname -r should display 6.19.11 or higher; verify with: cat /proc/version
FAQ
What is CVE-2026-31516?
This is a use-after-free vulnerability in the Linux kernel's XFRM subsystem where queued hash rebuild work items can outlive their parent network namespace, causing the kernel to dereference freed memory structures during teardown operations.
Is CVE-2026-31516 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are currently available. However, it poses a medium risk for kernel stability and denial-of-service scenarios.
What versions of Kernel are affected by CVE-2026-31516?
Linux kernel versions 6.19.0 through 6.19.10 are vulnerable. Version 6.19.11 and later contain the fix.
How do I check if my server is vulnerable to CVE-2026-31516?
Run: uname -r — if the output shows 6.19.0 through 6.19.10, your system is affected. Kernel versions outside the 6.19.x range are not impacted by this issue.
Does Defensia detect CVE-2026-31516?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2026-31516 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-31516. Free for 1 server.
Get started free