CVE-2026-64525
Received Received - Intake

RCU Synchronize in Linux Kernel xfrm Policy Cleanup

Vulnerability report for CVE-2026-64525, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-25

Last updated on: 2026-07-25

Assigner: kernel.org

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-25
Last Modified
2026-07-25
Generated
2026-07-25
AI Q&A
2026-07-25
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel From 6.18 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability in the Linux kernel involves improper handling of RCU (Read-Copy-Update) synchronization during network namespace cleanup. The xfrm_policy_fini() function calls synchronize_rcu() in the .exit handler of per-netns operations, which violates kernel guidelines. This causes cleanup_net() to wait for N full RCU grace periods serially when cleaning up N namespaces, leading to severe performance degradation and memory issues.

Detection Guidance

This vulnerability is specific to the Linux kernel's XFRM policy handling and may not have direct detection commands. Monitor for symptoms like high CPU usage in cleanup_net(), netns_wq rescuer kthread stalls, or excessive memory consumption in percpu allocations. Check kernel logs for RCU-related delays or OOM conditions.

Impact Analysis

This vulnerability can cause system slowdowns or crashes during network namespace cleanup, especially under heavy workloads like frequent unshare(CLONE_NEWNET) calls. It may lead to high memory usage (up to 130+ GB on large systems), memory exhaustion, and out-of-memory errors due to stalled cleanup processes.

Mitigation Strategies

Apply the kernel patch that moves policy_bydst RCU sync from .exit to .pre_exit handlers. Update to a fixed Linux kernel version where this issue is resolved. Monitor system performance and memory usage for signs of RCU stalls or OOM conditions.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-64525. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart