{"vuln_id":"CVE-2026-64525","aliases":[],"description":"In the Linux kernel, the following vulnerability has been resolved:\n\nxfrm: move policy_bydst RCU sync from per-netns .exit to .pre_exit\n\nThe struct pernet_operations docstring in include/net/net_namespace.h\nexplicitly warns against blocking RCU primitives in .exit handlers:\n\n    Exit methods using blocking RCU primitives, such as\n    synchronize_rcu(), should be implemented via exit_batch.\n    [...]\n    Please, avoid synchronize_rcu() at all, where it's possible.\n\n    Note that a combination of pre_exit() and exit() can\n    be used, since a synchronize_rcu() is guaranteed between\n    the calls.\n\nxfrm_policy_fini() violates this: it calls synchronize_rcu() before\nfreeing the policy_bydst hash tables (so no RCU reader is mid-\ntraversal at free time), but runs from xfrm_net_ops.exit -- once per\nnamespace -- so a cleanup_net() of N namespaces pays N full RCU\ngrace periods serially.\n\nUse the documented pre_exit/exit split. Move the policy flush (and\nthe workqueue drains it depends on) into a new .pre_exit handler;\nxfrm_policy_fini() then runs in .exit and frees the hash tables\nafter the synchronize_rcu_expedited() that cleanup_net() guarantees\nbetween the two phases. Providing O(1) RCU grace periods per batch\ninstead of O(N).\n\nObserved on Linux 6.18 with a workload doing unshare(CLONE_NEWNET)\nat ~13/sec sustained: cleanup_net() and the netns_wq rescuer kthread\nboth stuck in xfrm_policy_fini()'s synchronize_rcu(), >300k struct\nnet accumulated in the cleanup queue, Percpu in /proc/meminfo climbed\nto 130+ GB on 256-CPU hosts, and memcg OOMs followed. setup_net and\n__put_net counts were balanced, ruling out a refcount leak.","published_at":"2026-07-25T10:17:38.830000Z","modified_at":"2026-11-17T20:10:42.503000Z","first_seen_at":"2026-11-21T19:15:46.388302Z","severity":"medium","severity_source":"nvd","cvss_score":5.5,"cvss_vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","cwe":["CWE-401"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00114,"epss_percentile":0.01499,"nvd_status":"Analyzed","enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-64525"},"matched_alias":null,"items":[{"id":3302,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-64525: 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_operat…","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nxfrm: move policy_bydst RCU sync from per-netns .exit to .pre_exit\n\nThe struct pernet_operations docstring in include/net/net_namespace.h\nexplicitly warns against blocking RCU primitives in .exit handlers:\n\n    Exit methods using blocking RCU primitives, such as\n    synchronize_rcu(), should be implemented via exit_batch.\n    [...]\n    Please, avoid synchronize_rcu() at all, where it's possible.\n\n    Note that a combination of pre_exit() and exit() can\n    be used, since a synchronize_rcu() is guaranteed between\n    the calls.\n\nxfrm_policy_fini() violates this: it calls synchronize_rcu() before\nfreeing the policy_bydst hash tables (so no RCU reader is mid-\ntraversal at free time), but runs from xfrm_net_ops.exit -- once per\nnamespace -- so a cleanup_net() of N namespaces pays N full RCU\ngrace periods serially.\n\nUse the documented pre_exit/exit split. Move the policy flush (and\nthe workqueue drains it depends on) into a new .pre_exit handler;\nxfrm_policy_fini() then runs in .exit and frees the hash tables\nafter the synchronize_rcu_expedited() that cleanup_net() guarantees\nbetween the two phases. Providing O(1) RCU grace periods per batch\ninstead of O(N).\n\nObserved on Linux 6.18 with a workload doing unshare(CLONE_NEWNET)\nat ~13/sec sustained: cleanup_net() and the netns_wq rescuer kthread\nboth stuck in xfrm_policy_fini()'s synchronize_rcu(), >300k struct\nnet accumulated in the cleanup queue, Percpu in /proc/meminfo climbed\nto 130+ GB on 256-CPU hosts, and memcg OOMs followed. setup_net and\n__put_net counts were balanced, ruling out a refcount leak.\n\nReferences:\nhttps://git.kernel.org/stable/c/3e52417318473782012b236d0325bf7d2266a597\nhttps://git.kernel.org/stable/c/91cc13978ab0bc6f669139f53e7e613a860d10e0\nhttps://git.kernel.org/stable/c/bca6386dc08750fc7cdcbc7683473748ba3114b9\nhttps://git.kernel.org/stable/c/d14ae8ef88c2c6590e107db61b6adce148cec7b3","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64525","published_at":"2026-07-25T10:17:38.830000Z","updated_at":"2026-11-17T20:10:42.503000Z","fetched_at":"2026-11-21T19:15:31.478889Z","severity":"medium","cvss_score":5.5,"epss":0.00114,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"linux","product":null,"vuln_id":"CVE-2026-64525","vuln_ids":["CVE-2026-64525"],"tags":["CWE-401"],"cluster_id":3393,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/3302","html":"https://vulnwatch.ve1ve2.com/item/3302"}}]}