CVE-2026-46116: xfrm: defensively unhash xfrm_state lists in __xfrm_state_delete

Published May 28, 2026
·
Updated

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

xfrm: defensively unhash xfrmstate lists in xfrmstatedelete

KASAN reproduces a slab-use-after-free in xfrmstatedelete()'s hlistdelrcu calls under syzkaller load on linux-6.12.y stable (reproduced on 6.12.47, also reachable via the same code path on torvalds/master and on the ipsec tree). Nine unique signatures cluster in the xfrmstate lifecycle, the load-bearing one being:

BUG: KASAN: slab-use-after-free in hlistdel include/linux/list.h:990 [inline] BUG: KASAN: slab-use-after-free in hlistdelrcu include/linux/rculist.h:516 [inline] BUG: KASAN: slab-use-after-free in xfrmstatedelete net/xfrm/xfrmstate.c Write of size 8 at addr ffff8881198bcb70 by task kworker/u8:9/435

Workqueue: netns cleanupnet Call Trace: hlistdel / hlistdelrcu xfrmstatedelete xfrmstatedelete xfrmstateflush xfrmstatefini opsexitlist cleanupnet

The other observed signatures hit the same slab object from xfrmstatelookup, xfrmallocspi, xfrmstateinsert and an OOB write variant of xfrmstatedelete, all on the byseq/byspi hash chains.

xfrmstatedelete() guards its byseq and byspi unhashes with value-based predicates:

if (x->km.seq) hlistdelrcu(&x->byseq); if (x->id.spi) hlistdelrcu(&x->byspi);

while everywhere else in the file (e.g. statecache, statecacheinput) the safer hlistunhashed() check is used. xfrmallocspi() sets x->id.spi = newspi inside xfrmstatelock and then immediately inserts into byspi, but a path that observes x->id.spi != 0 outside of xfrmstatelock can still skip-or-hit the byspi unhash inconsistently with whether x is actually on the list. The same holds for x->km.seq versus byseq, and the bydst/bysrc unhashes have no predicate at all, so a second xfrmstatedelete() on the same object writes through LISTPOISON pprev.

The defensive change here:

- Use hlistdelinitrcu() instead of hlistdelrcu() on bydst, bysrc, byseq and byspi so a second deletion is a no-op rather than a write through LISTPOISON pprev. The byseq/byspi nodes are already initialised in xfrmstatealloc(). - Test hlistunhashed() rather than the value predicate for byseq/byspi, so the unhash decision tracks list state rather than mutable scalar fields.

Empirical verification: applied this patch on top of v6.12.47, rebuilt, and re-ran the same syzkaller harness for 1h16m on a previously-crashy configuration that produced ~100 hits each of slab-use-after-free Read in xfrmallocspi / Read in xfrmstatelookup / Write in xfrmstatedelete. After the patch, 7.1M execs across 32 VMs at ~1550 exec/sec produced zero xfrmstate UAF/OOB hits. /proc/slabinfo confirms the xfrmstate slab is actively allocated and freed during the run (~143 KiB resident), so the fuzzer is still exercising those code paths -- they just no longer crash.

Reproduction:

- Linux 6.12.47 x8664 + KASANGENERIC + KASANINLINE + KCOV - syzkaller @ 746545b8b1e4c3a128db8652b340d3df90ce61db - 32 QEMU/KVM VMs x 2 vCPU on AWS c5.metal bare metal - 9 unique signatures collected in ~9h, all within xfrmstate lifecycle

Affected Software

10 affected componentsFixes available
Linux Linux kernel<=6.12.47
Linux Linux kernel>=2.6.19<5.15.210
Linux Linux kernel>=5.16<6.1.176
Linux Linux kernel>=6.2<6.6.140
Linux Linux kernel>=6.7<6.12.88
Linux Linux kernel>=6.13<6.18.30
Linux Linux kernel>=6.19<7.0.7
Linux Linux kernel=7.1-rc1
Linux Linux kernel=7.1-rc2
Microsoft azl3 kernel 6.6.139.1-1<6.6.141.1-1
6.6.141.1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 6.6.141.1-1
  2. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch syzkaller @ 746545b8b1e4c3a128db8652b340d3df90ce61db
  3. Configuration

    Apply the defensive change in xfrm_state: use hlist_del_init_rcu() rather than hlist_del_rcu() on bydst (as described: “Use hlist_del_init_rcu() instead of hlist_del_rcu() on bydst”).

    Linux kernel (xfrm: xfrm_state) unhash_byseq_byspi_using = hlist_del_init_rcu() instead of hlist_del_rcu() on bydst
  4. Configuration

    In __xfrm_state_delete(), guard the byseq/byspi unhash decision using hlist_unhashed() (instead of value-based predicates) so that a second deletion becomes a no-op rather than touching LIST_POISON pprev.

    Linux kernel (xfrm: xfrm_state) unhash_membership_check = use hlist_unhashed() rather than value predicate for list membership
  5. Configuration

    Update __xfrm_state_delete() so the unhash decision for byseq/byspi tracks list state (not mutable scalar fields such as x->id.spi / x->km.seq), preventing OOB or UAF on repeated deletion under netns cleanup paths (e.g., cleanup_net → workqueue: netns cleanup_net).

    Linux kernel (xfrm: __xfrm_state_delete) unhash_logic_targets = track list state rather than bysrc/byseq/byspi scalar fields

Event History

May 28, 2026
CVE Published
via MITRE·09:35 AM
Data Sourced
via MITRE·09:35 AM
DescriptionSeverity
Data Sourced
via NVD·10:16 AM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via Red Hat·11:01 AM
DescriptionSeverityAffected Software
May 29, 2026
Data Sourced
via Microsoft·08:05 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:05 AM
Affected Software
Updated
via Microsoft·08:05 AM
DescriptionSeverity

Frequently Asked Questions

1

What level of access does an attacker need?

The CVSS vector indicates local access with low privileges is required. No user interaction is required.

2

What is the likely security impact?

The vulnerability is classified as a use-after-free with high confidentiality impact and low availability impact. The supplied CVSS vector does not indicate an integrity impact.

3

Which environments were directly observed to reach the vulnerable code path?

The issue was reproduced under syzkaller load on Linux 6.12.47 in the 6.12.y stable series. The same code path was also reported as reachable on torvalds/master and the IPsec tree.

4

Which products are identified in the supplied data?

The listed software includes the Linux kernel and Microsoft azl3 kernel 6.6.139.1-1.

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