CVE-2026-31516

Source
https://cve.org/CVERecord?id=CVE-2026-31516
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31516.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-31516
Downstream
Related
Published
2026-04-22T13:54:32.851Z
Modified
2026-06-09T18:29:17.677231608Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
xfrm: prevent policy_hthresh.work from racing with netns teardown
Details

In the Linux kernel, the following vulnerability has been resolved:

xfrm: prevent policy_hthresh.work from racing with netns teardown

A XFRMMSGNEWSPDINFO request can queue the per-net work item policy_hthresh.work onto the system workqueue.

The queued callback, xfrmhashrebuild(), retrieves the enclosing struct net via containerof(). If the net namespace is torn down before that work runs, the associated struct net may already have been freed, and xfrmhash_rebuild() may then dereference stale memory.

xfrmpolicyfini() already flushes policyhashwork during teardown, but it does not synchronize policy_hthresh.work.

Synchronize policyhthresh.work in xfrmpolicy_fini() as well, so the queued work cannot outlive the net namespace teardown and access a freed struct net.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31516.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
880a6fab8f6ba5b5abe59ea68533202ddea1012c
Fixed
56ea2257b83ee29a543f158159e3d1abc1e3e4fe
Fixed
8854e9367465d784046362698731c1111e3b39b8
Fixed
4e2e77843fef473ef47e322d52436d8308582a96
Fixed
29fe3a61bcdce398ee3955101c39f89c01a8a77e

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31516.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.18.0
Fixed
6.12.80
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.21
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
6.19.11

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31516.json"