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

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-02)
- Published: 2026-09-04T15:54:55.489Z
- Modified: 2026-10-19T09:17:19.983Z
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from f531d13bdfe3f4f084aaa8acae2cb0f02295f5ae before ea09210462316e5235a25eccb11ad0708d86615e; from f531d13bdfe3f4f084aaa8acae2cb0f02295f5ae before 5c86c895d1cac81a71ead3005084c6265cf6a7a5; from f531d13bdfe3f4f084aaa8acae2cb0f02295f5ae before 89ef3a2e1e4682ab82b0455ce113f8c39fb9e50d; from f531d13bdfe3f4f084aaa8acae2cb0f02295f5ae before a9fa05b7a1246797748d15771052639e0d3cabf1; from f531d13bdfe3f4f084aaa8acae2cb0f02295f5ae before 763fe700b7c58ad64fe5202c5638848244dd4127; 6.11 (not affected: before 6.11; from 6.12.108 up to 6.12.*; from 6.18.49 up to 6.18.*; from 7.1.13 up to 7.1.*; from 7.2.3 up to 7.2.*; from 7.3 up to *)

## References

- <https://git.kernel.org/stable/c/ea09210462316e5235a25eccb11ad0708d86615e>
- <https://git.kernel.org/stable/c/5c86c895d1cac81a71ead3005084c6265cf6a7a5>
- <https://git.kernel.org/stable/c/89ef3a2e1e4682ab82b0455ce113f8c39fb9e50d>
- <https://git.kernel.org/stable/c/a9fa05b7a1246797748d15771052639e0d3cabf1>
- <https://git.kernel.org/stable/c/763fe700b7c58ad64fe5202c5638848244dd4127>

## Sources

- CVE List: [CVE-2026-80845](https://www.cve.org/CVERecord?id=CVE-2026-80845), CVE Terms of Use, modified 2026-10-19
- NVD: [CVE-2026-80845](https://nvd.nist.gov/vuln/detail/CVE-2026-80845), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2026-80845 · Whole record: https://cve.day/CVE-2026-80845.json · Rebuilt by cve.day 2026-11-25T22:59:36.348Z
