7.8
HIGH CVSS 3.1
CVE-2026-31516
xfrm: prevent policy_hthresh.work from racing with netns teardown
Description

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.

INFO

Published Date :

April 22, 2026, 2:16 p.m.

Last Modified :

Nov. 11, 2026, 11:10 p.m.

Remotely Exploit :

No

Source :

416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Products

The following products are affected by CVE-2026-31516 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Linux linux_kernel
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 134c704f-9b21-4f2e-91b3-4a467353bcc0
CVSS 3.1 HIGH 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Solution
Synchronize the policy_hthresh.work during net namespace teardown.
  • Ensure policy_hthresh.work synchronizes with net namespace teardown.
  • Flush policy_hthresh.work in xfrm_policy_fini().
References to Advisories, Solutions, and Tools
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-31516 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-31516 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-31516 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-31516 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Translated by [email protected]

    Nov. 11, 2026

    Action Type Old Value New Value
    Added Translation Title: Linux Kernel, Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: xfrm: evitar que policy_hthresh.work compita con el desmantelamiento de netns Una solicitud XFRM_MSG_NEWSPDINFO puede encolar el elemento de trabajo por red policy_hthresh.work en la cola de trabajo del sistema. La devolución de llamada encolada, xfrm_hash_rebuild(), recupera la struct net contenedora a través de container_of(). Si el espacio de nombres de red es desmantelado antes de que se ejecute ese trabajo, la struct net asociada puede que ya haya sido liberada, y xfrm_hash_rebuild() puede entonces desreferenciar memoria obsoleta. xfrm_policy_fini() ya vacía policy_hash_work durante el desmantelamiento, pero no sincroniza policy_hthresh.work. Sincronizar policy_hthresh.work también en xfrm_policy_fini(), para que el trabajo encolado no pueda sobrevivir al desmantelamiento del espacio de nombres de red y acceder a una struct net liberada.
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Oct. 19, 2026

    Action Type Old Value New Value
    Added CWE CWE-416
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Oct. 16, 2026

    Action Type Old Value New Value
    Added Reference https://git.kernel.org/stable/c/29fe3a61bcdce398ee3955101c39f89c01a8a77e
    Added Reference https://git.kernel.org/stable/c/4e2e77843fef473ef47e322d52436d8308582a96
    Added Reference https://git.kernel.org/stable/c/56ea2257b83ee29a543f158159e3d1abc1e3e4fe
    Added Reference https://git.kernel.org/stable/c/8854e9367465d784046362698731c1111e3b39b8
    Removed Reference https://git.kernel.org/stable/c/29fe3a61bcdce398ee3955101c39f89c01a8a77e
    Removed Reference https://git.kernel.org/stable/c/4e2e77843fef473ef47e322d52436d8308582a96
    Removed Reference https://git.kernel.org/stable/c/56ea2257b83ee29a543f158159e3d1abc1e3e4fe
    Removed Reference https://git.kernel.org/stable/c/8854e9367465d784046362698731c1111e3b39b8
    Removed Reference Type https://git.kernel.org/stable/c/29fe3a61bcdce398ee3955101c39f89c01a8a77e Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/4e2e77843fef473ef47e322d52436d8308582a96 Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/56ea2257b83ee29a543f158159e3d1abc1e3e4fe Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/8854e9367465d784046362698731c1111e3b39b8 Types: Patch
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Oct. 16, 2026

    Action Type Old Value New Value
    Added SSVC {'id': 'CVE-2026-31516', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'total'}], 'version': '2.0.3', 'timestamp': '2026-10-16T15:10:33.949707Z'}
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Jun. 17, 2026

    Action Type Old Value New Value
    Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '880a6fab8f6ba5b5abe59ea68533202ddea1012c', 'lessThan': '56ea2257b83ee29a543f158159e3d1abc1e3e4fe', 'versionType': 'git'}, {'status': 'affected', 'version': '880a6fab8f6ba5b5abe59ea68533202ddea1012c', 'lessThan': '8854e9367465d784046362698731c1111e3b39b8', 'versionType': 'git'}, {'status': 'affected', 'version': '880a6fab8f6ba5b5abe59ea68533202ddea1012c', 'lessThan': '4e2e77843fef473ef47e322d52436d8308582a96', 'versionType': 'git'}, {'status': 'affected', 'version': '880a6fab8f6ba5b5abe59ea68533202ddea1012c', 'lessThan': '29fe3a61bcdce398ee3955101c39f89c01a8a77e', 'versionType': 'git'}], 'programFiles': ['net/xfrm/xfrm_policy.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '3.18'}, {'status': 'unaffected', 'version': '0', 'lessThan': '3.18', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.12.80', 'versionType': 'semver', 'lessThanOrEqual': '6.12.*'}, {'status': 'unaffected', 'version': '6.18.21', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '6.19.11', 'versionType': 'semver', 'lessThanOrEqual': '6.19.*'}, {'status': 'unaffected', 'version': '7.0', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['net/xfrm/xfrm_policy.c'], 'defaultStatus': 'affected'}]
  • Initial Analysis by [email protected]

    Apr. 28, 2026

    Action Type Old Value New Value
    Added CWE CWE-362
    Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:3.18:-:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.13 up to (excluding) 6.18.21 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.19 up to (excluding) 6.19.11 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 3.18.1 up to (excluding) 6.12.80
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/29fe3a61bcdce398ee3955101c39f89c01a8a77e Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/4e2e77843fef473ef47e322d52436d8308582a96 Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/56ea2257b83ee29a543f158159e3d1abc1e3e4fe Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/8854e9367465d784046362698731c1111e3b39b8 Types: Patch
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Apr. 27, 2026

    Action Type Old Value New Value
    Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Apr. 22, 2026

    Action Type Old Value New Value
    Added Description 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.
    Added Reference https://git.kernel.org/stable/c/29fe3a61bcdce398ee3955101c39f89c01a8a77e
    Added Reference https://git.kernel.org/stable/c/4e2e77843fef473ef47e322d52436d8308582a96
    Added Reference https://git.kernel.org/stable/c/56ea2257b83ee29a543f158159e3d1abc1e3e4fe
    Added Reference https://git.kernel.org/stable/c/8854e9367465d784046362698731c1111e3b39b8
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.