CVE-2026-98231: xfrm: serialize state GC with device state flush

Published Oct 6, 2026
·
Updated

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

xfrm: serialize state GC with device state flush

The deferred-device pass in xfrmdevstateflush() finds states under xfrmstatedevgclock, but drops the lock before calling xfrmdevstatefree() because the driver callback may sleep. The device GC list does not hold an xfrmstate reference, so the state GC worker can destroy the same state concurrently.

The race can proceed as follows:

CPU 0 CPU 1 find x on the device GC list drop xfrmstatedevgclock read x->xso.dev xfrmstategcdestroy(x) xfrmdevstatefree(x) xfrmstatefree(x) continue xfrmdevstatefree(x)

Both paths can invoke the driver callback and drop the device reference. CPU 0 can also access the xfrmstate after CPU 1 has freed it.

KASAN reported:

BUG: KASAN: slab-use-after-free in xfrmdevstatefree+0x24c/0x2a0 Read of size 8 at addr ffff88810bbaa960 by task poc/102

Call Trace: xfrmdevstatefree+0x24c/0x2a0 xfrmdevstateflush+0x353/0x400 xfrmdevevent+0x26d/0x3a0 notifiercallchain+0xc0/0x280 devnotifyflags+0x169/0x250 netifchangeflags+0xe7/0x160 devchangeflags+0x96/0x220 devinetioctl+0x7f4/0x1880

Allocated by task 87: xfrmstatealloc+0x1e/0x5c0 xfrmaddsa+0xe7f/0x5820 xfrmuserrcvmsg+0x4f3/0x940

Freed by task 57: kmemcachefree+0xcb/0x3d0 xfrmstategctask+0x4a8/0x650 processonework+0x63a/0x1070

Serialize xfrmstate destruction against the deferred-device pass with a mutex. Keep xfrmstatedevgclock limited to list operations and retain the existing callback and device-reference release ordering.

Affected Software

1 affected component
Linux Linux kernel

Event History

Oct 6, 2026
CVE Published
via MITRE·08:45 AM
Data Sourced
via MITRE·08:45 AM
Description
Data Sourced
via NVD·09:18 AM
Description
Oct 7, 2026
Data Sourced
via Microsoft·08:08 AM
DescriptionSeverityWeakness
Sep 6, 58736
Event
via FIRST·11:30 AM

Frequently Asked Questions

1

What conditions are needed to trigger this race?

The race involves XFRM device state flushing occurring concurrently with the XFRM state garbage-collection worker. It is associated with the deferred-device pass in xfrm_dev_state_flush() and can be reached through device events such as network-interface flag changes.

2

What is the observed impact?

Concurrent cleanup can cause both paths to invoke the driver callback and release the device reference for the same state. One path may then access an xfrm_state after the other has freed it, resulting in a slab use-after-free reported by KASAN.

3

How can I identify a potentially affected system?

Look for KASAN reports identifying a slab use-after-free in xfrm_dev_state_free(), with call paths involving xfrm_dev_state_flush(), xfrm_dev_event(), and network device flag-change handling. The provided data does not identify affected kernel versions.

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