CVE-2026-31516: xfrm: prevent policy_hthresh.work from racing with netns teardown
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.
Security readout for executives and security teams
Plain-English summary
A local, low-privileged user may trigger a Linux kernel timing flaw during network namespace shutdown. The kernel can access memory after it has been freed, potentially causing a crash or compromising confidentiality and integrity. Systems allowing untrusted local users, containers, or network-namespace activity deserve prompt review.
Executive priority
Treat as a high-priority kernel update where untrusted users or workloads share Linux hosts. Internet exposure alone does not establish reachability because the stated attack vector is local. Accelerate remediation on container infrastructure and multi-tenant systems; use normal risk-based scheduling for tightly controlled single-purpose hosts.
Technical view
An XFRM_MSG_NEWSPDINFO request can queue policy_hthresh.work. During network namespace teardown, xfrm_policy_fini() previously synchronized another work item but not this one. If xfrm_hash_rebuild() runs after the associated struct net is freed, it may dereference stale memory. The stable fixes synchronize policy_hthresh.work during teardown.
Likely exposure
Exposure requires local access with low privileges and relevant XFRM and network-namespace activity. Multi-user Linux hosts and container platforms may have greater practical exposure. The supplied version data is ambiguous, so exact affected ranges should be confirmed against kernel or distribution guidance and the referenced stable commits.
Exploitation context
The supplied CVSS is 7.8: local access, low complexity, low privileges, no user interaction, and potentially high confidentiality, integrity, and availability impact. The bundle marks this CVE as absent from KEV and provides no evidence of active or public exploitation.
Researcher notes
This is a race-driven stale-memory dereference involving asynchronous work and net namespace lifetime. The source bundle identifies the synchronization fix but does not provide a CWE, deterministic reproduction conditions, confirmed exploitability, or clear version-range semantics. Avoid inferring remote reachability or active exploitation from the impact score.
Mitigation direction
Update to a vendor-supported kernel containing the applicable stable fix.
Check distribution security advisories to map packaged kernel versions to the referenced commits.
Prioritize shared hosts and container platforms permitting untrusted local workloads.
Restrict unnecessary local access and network-namespace capabilities until updates are applied.
Validation and detection
Inventory kernel versions across physical hosts, virtual machines, and container nodes.
Compare each vendor kernel package with current distribution guidance and stable fix commits.
Confirm the running kernel changed after updating and rebooting.
Review kernel logs for unexplained crashes or memory-safety faults around XFRM and namespace teardown.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2026-31516 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
5Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.