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

xfrm: avoid lock inversion in nat keepalive work

nat_keepalive_work() walks the state table while xfrm_state_walk()
holds net->xfrm.xfrm_state_lock. Its callback then acquires x->lock,
which conflicts with the delete path taking the same locks in reverse
order via xfrm_state_delete() and __xfrm_state_delete(). This creates
an AB-BA deadlock that is reported by lockdep when a NAT keepalive
worker races with SA deletion.

Fix this by splitting the keepalive walk into two phases. First,
collect the candidate states while the walk holds xfrm_state_lock and
take a reference on each state. Then, after the walk completes, process
each collected state and acquire x->lock without nesting it under
xfrm_state_lock.
Published: 2026-09-04
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw resides in the Linux kernel’s NAT keepalive logic, where the nat_keepalive_work() routine walks the state table while holding the xfrm_state_lock and then attempts to acquire individual state locks (x->lock). The delete path, however, locks these resources in the reverse order. This reverse ordering (AB‑BA) can lead to a classic deadlock, causing the keepalive worker to stall and potentially disrupting network packet handling. The underlying weakness is a deadlock resulting from improper lock ordering, classified as CWE-666.

Affected Systems

Any Linux kernel build that still contains the original nat_keepalive_work() and xfrm_state_walk() implementations without the recent commit is vulnerable. The vendor coverage is Linux: Linux, meaning all kernel source releases that include this code path are at risk until the patch is applied.

Risk and Exploitability

No CVSS score is listed, and the EPSS score is not available, which suggests either a lack of published data or an extremely low exploitation probability. The vulnerability is not in the CISA KEV catalog. The deadlock can only be triggered under conditions where a NAT keepalive worker and a state deletion race, typically requiring local or privileged execution, though a malformed packet stream might accelerate the race. In practice, the impact is limited to denial of service for affected networking services, not direct lateral movement or data leakage.

Generated by OpenCVE AI on September 4, 2026 at 21:38 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the kernel patch that implements the commit "xfrm: avoid lock inversion in nat keepalive work" so the keepalive walk is split into two phases, eliminating the lock inversion.
  • If a kernel update cannot be applied immediately, mitigate by disabling or reducing the NAT keepalive worker—adjust the keepalive interval or turn off nat_keepalive work in the firewall configuration to prevent the race condition.
  • Continuously monitor kernel logs for lockdep deadlock messages and, if a deadlock is detected, restart affected networking services to restore operation.

Generated by OpenCVE AI on September 4, 2026 at 21:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Sep 2026 22:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-666

Fri, 04 Sep 2026 16:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: xfrm: avoid lock inversion in nat keepalive work nat_keepalive_work() walks the state table while xfrm_state_walk() holds net->xfrm.xfrm_state_lock. Its callback then acquires x->lock, which conflicts with the delete path taking the same locks in reverse order via xfrm_state_delete() and __xfrm_state_delete(). This creates an AB-BA deadlock that is reported by lockdep when a NAT keepalive worker races with SA deletion. Fix this by splitting the keepalive walk into two phases. First, collect the candidate states while the walk holds xfrm_state_lock and take a reference on each state. Then, after the walk completes, process each collected state and acquire x->lock without nesting it under xfrm_state_lock.
Title xfrm: avoid lock inversion in nat keepalive work
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-09-04T15:54:55.489Z

Reserved: 2026-08-26T14:34:25.797Z

Link: CVE-2026-80845

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-04T16:18:13.173

Modified: 2026-09-04T16:18:13.173

Link: CVE-2026-80845

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-05T03:15:16Z

Weaknesses
  • CWE-666

    Operation on Resource in Wrong Phase of Lifetime