CVE-2026-80845: xfrm: avoid lock inversion in nat keepalive work

Published Sep 4, 2026
·
Updated

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

xfrm: avoid lock inversion in nat keepalive work

natkeepalivework() walks the state table while xfrmstatewalk() holds net->xfrm.xfrmstatelock. Its callback then acquires x->lock, which conflicts with the delete path taking the same locks in reverse order via xfrmstatedelete() and xfrmstatedelete(). 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 xfrmstatelock and take a reference on each state. Then, after the walk completes, process each collected state and acquire x->lock without nesting it under xfrmstatelock.

Affected Software

1 affected component
Linux Linux kernel

Event History

Sep 4, 2026
CVE Published
via MITRE·03:54 PM
Data Sourced
via MITRE·03:54 PM
Description

Frequently Asked Questions

1

When can this deadlock occur?

It can occur when the NAT keepalive worker is walking XFRM states at the same time that a security association is being deleted. The conflicting lock order between the keepalive path and deletion path can create an AB-BA deadlock.

2

What is the operational impact of triggering the issue?

The affected work can deadlock, preventing the involved kernel paths from making progress. Lockdep reports the issue when the NAT keepalive worker races with security association deletion.

3

How does the resolved implementation prevent the lock inversion?

It first collects candidate states and takes references while holding xfrm_state_lock. It then processes those states only after the walk is complete, acquiring each state lock without nesting it under xfrm_state_lock.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203