CVE-2026-80845 in Linuxinfo

Summary

by MITRE • 09/04/2026

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.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 09/04/2026

The Linux kernel's IPsec implementation contains a concurrency flaw within the network address translation keepalive mechanism that can lead to a deadlock condition during state management operations. This vulnerability arises from an improper lock ordering sequence in the nat_keepalive_work function, which is responsible for maintaining active connections by periodically sending keepalive packets through the xfrm subsystem. The core issue stems from the fact that this worker routine iterates over the security association state table while holding the net->xfrm.xfrm_state_lock mutex to ensure safe traversal of the data structures. During this iteration, it invokes a callback function for each valid state entry, which subsequently attempts to acquire the individual x->lock associated with that specific security association object. This nested locking pattern creates a critical dependency chain where one execution path holds the global state lock and waits for the per-state lock.

The deadlock scenario is triggered when this operation races against another kernel thread performing a deletion of a security association via the xfrm_state_delete or __xfrm_state_delete functions. The delete path acquires locks in the reverse order, first taking the individual x->lock to modify the state and then acquiring the net->xfrm.xfrm_state_lock to remove it from the global list. This inversion of lock acquisition order between the keepalive worker and the deletion routine constitutes a classic AB-BA deadlock pattern. The Linux kernel's lock dependency validator, known as lockdep, is designed to detect such circular dependencies at runtime or during static analysis, and this specific race condition has been identified by it as a potential system hang that can render network processing unresponsive under high load conditions involving frequent state changes.

From a technical classification perspective, this vulnerability aligns with CWE-833, which covers Deadlock scenarios resulting from improper resource locking sequences. It also relates to concurrency control failures often associated with race conditions in kernel space where multiple execution contexts attempt to access shared data structures without consistent lock ordering protocols. The operational impact of such a deadlock is severe within the context of network security infrastructure, as it can cause the affected kernel thread to block indefinitely, potentially leading to system-wide latency spikes or complete unresponsiveness if critical networking paths are blocked. This poses a significant risk to availability and stability for systems relying on Linux-based IPsec implementations, particularly those with high turnover rates in security associations such as dynamic VPN gateways or mobile network nodes.

The resolution implemented involves restructuring the nat_keepalive_work function to eliminate the nested locking requirement by splitting its operation into two distinct phases. In the first phase, the routine walks the state table while holding only the net->xfrm.xfrm_state_lock, collecting references to candidate states without attempting to acquire any per-state locks during this traversal. Once the walk is complete and the global lock is released, the second phase proceeds to process each collected state individually. During this processing stage, the function acquires the x->lock for each specific security association independently of the global state lock. This approach ensures that no two threads ever hold both locks simultaneously in a conflicting order, thereby breaking the circular dependency chain and preventing the deadlock from occurring regardless of scheduling timing or race conditions between keepalive workers and deletion routines.

Mitigation strategies for organizations running affected kernel versions include applying upstream Linux kernel patches as soon as they are available through standard distribution update channels. For environments where immediate patching is not feasible, monitoring system logs for lockdep warnings can provide early indication of the condition manifesting in production systems. Additionally, reducing the frequency of security association deletions or keeping keepalive intervals longer may reduce the probability window for the race condition to trigger, although this does not eliminate the underlying defect. Long-term architectural improvements should focus on enforcing strict lock ordering policies across all kernel subsystems that interact with shared data structures to prevent similar concurrency issues in other components of the network stack.

Responsible

Linux

Reservation

08/26/2026

Disclosure

09/04/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!