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

xfrm: move policy_bydst RCU sync from per-netns .exit to .pre_exit

The struct pernet_operations docstring in include/net/net_namespace.h
explicitly warns against blocking RCU primitives in .exit handlers:

Exit methods using blocking RCU primitives, such as
synchronize_rcu(), should be implemented via exit_batch.
[...]
Please, avoid synchronize_rcu() at all, where it's possible.

Note that a combination of pre_exit() and exit() can
be used, since a synchronize_rcu() is guaranteed between
the calls.

xfrm_policy_fini() violates this: it calls synchronize_rcu() before
freeing the policy_bydst hash tables (so no RCU reader is mid-
traversal at free time), but runs from xfrm_net_ops.exit -- once per
namespace -- so a cleanup_net() of N namespaces pays N full RCU
grace periods serially.

Use the documented pre_exit/exit split. Move the policy flush (and
the workqueue drains it depends on) into a new .pre_exit handler;
xfrm_policy_fini() then runs in .exit and frees the hash tables
after the synchronize_rcu_expedited() that cleanup_net() guarantees
between the two phases. Providing O(1) RCU grace periods per batch
instead of O(N).

Observed on Linux 6.18 with a workload doing unshare(CLONE_NEWNET)
at ~13/sec sustained: cleanup_net() and the netns_wq rescuer kthread
both stuck in xfrm_policy_fini()'s synchronize_rcu(), >300k struct
net accumulated in the cleanup queue, Percpu in /proc/meminfo climbed
to 130+ GB on 256-CPU hosts, and memcg OOMs followed. setup_net and
__put_net counts were balanced, ruling out a refcount leak.
Published: 2026-07-25
Score: 7.0 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

An early‑exit handler in the Linux kernel’s xfrm policy cleanup synchronizes with RCU while holding the policy_bydst hash tables. The synchronizing call is executed in a per‑namespace .exit method, causing cleanup of every namespace to wait for a full RCU grace period sequentially. When many network namespaces are created at high frequency, each cleanup stalls for a long time, allowing memory to accumulate and eventually trigger out‑of‑memory conditions. This is a classic example of a locking issue that falls under CWE‑821, where synchronization primitives are used incorrectly during cleanup. The impact is therefore the consumption of system memory and potential denial‑of‑service via OOM, not immediate code execution.

Affected Systems

The flaw exists in the Linux kernel, observed in release 6.18. Any Linux distribution using this kernel version or earlier versions that have not applied the RCU‑pre_exit change is vulnerable. The primary affected component is the xfrm policy cleanup routine that operates during namespace teardown. No specific vendor or product patch level list is supplied, but all kernels before the commit that moves the logic to .pre_exit are impacted.

Risk and Exploitability

The EPSS score is reported as less than 1 %, indicating a very low probability of widespread exploitation at this time, and the vulnerability is not listed in CISA’s KEV catalog. Exploitation would likely require an actor with sufficient privileges to create many network namespaces on the host or a workload that continuously spins namespaces, making this a local or privileged‑class risk. The operational impact can be severe on large systems (hundreds of CPUs) where a long tail of RCU grace periods can accumulate to hundreds of gigabytes of memory, leading to kernel OOM survivors. Because the attack mechanism is tied to namespace allocation rate, timely patching mitigates the risk effectively.

Generated by OpenCVE AI on August 5, 2026 at 00:13 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the RCU‑pre_exit fix, such as 6.18.1 or later.
  • If immediate kernel upgrade is not possible, apply the upstream patch that moves the synchronize_rcu() call to a .pre_exit handler.
  • Restrict the creation of network namespaces in workloads that may generate many namespaces, and monitor kernel logs for RCU sync stalls or memcg OOM events.

Generated by OpenCVE AI on August 5, 2026 at 00:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
History

Mon, 03 Aug 2026 18:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-399

Thu, 30 Jul 2026 02:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-399

Thu, 30 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-821
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Moderate


Sat, 25 Jul 2026 10:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: xfrm: move policy_bydst RCU sync from per-netns .exit to .pre_exit The struct pernet_operations docstring in include/net/net_namespace.h explicitly warns against blocking RCU primitives in .exit handlers: Exit methods using blocking RCU primitives, such as synchronize_rcu(), should be implemented via exit_batch. [...] Please, avoid synchronize_rcu() at all, where it's possible. Note that a combination of pre_exit() and exit() can be used, since a synchronize_rcu() is guaranteed between the calls. xfrm_policy_fini() violates this: it calls synchronize_rcu() before freeing the policy_bydst hash tables (so no RCU reader is mid- traversal at free time), but runs from xfrm_net_ops.exit -- once per namespace -- so a cleanup_net() of N namespaces pays N full RCU grace periods serially. Use the documented pre_exit/exit split. Move the policy flush (and the workqueue drains it depends on) into a new .pre_exit handler; xfrm_policy_fini() then runs in .exit and frees the hash tables after the synchronize_rcu_expedited() that cleanup_net() guarantees between the two phases. Providing O(1) RCU grace periods per batch instead of O(N). Observed on Linux 6.18 with a workload doing unshare(CLONE_NEWNET) at ~13/sec sustained: cleanup_net() and the netns_wq rescuer kthread both stuck in xfrm_policy_fini()'s synchronize_rcu(), >300k struct net accumulated in the cleanup queue, Percpu in /proc/meminfo climbed to 130+ GB on 256-CPU hosts, and memcg OOMs followed. setup_net and __put_net counts were balanced, ruling out a refcount leak.
Title xfrm: move policy_bydst RCU sync from per-netns .exit to .pre_exit
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-07-25T09:20:49.256Z

Reserved: 2026-07-19T15:36:31.794Z

Link: CVE-2026-64525

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-07-25T10:17:38.830

Modified: 2026-07-25T10:17:38.830

Link: CVE-2026-64525

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-25T00:00:00Z

Links: CVE-2026-64525 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-05T00:15:04Z

Weaknesses
  • CWE-821

    Incorrect Synchronization