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

xfrm: serialize state GC with device state flush

The deferred-device pass in xfrm_dev_state_flush() finds states under
xfrm_state_dev_gc_lock, but drops the lock before calling
xfrm_dev_state_free() because the driver callback may sleep. The device
GC list does not hold an xfrm_state 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 xfrm_state_dev_gc_lock
read x->xso.dev
xfrm_state_gc_destroy(x)
xfrm_dev_state_free(x)
xfrm_state_free(x)
continue xfrm_dev_state_free(x)

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

KASAN reported:

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

Call Trace:
xfrm_dev_state_free+0x24c/0x2a0
xfrm_dev_state_flush+0x353/0x400
xfrm_dev_event+0x26d/0x3a0
notifier_call_chain+0xc0/0x280
__dev_notify_flags+0x169/0x250
netif_change_flags+0xe7/0x160
dev_change_flags+0x96/0x220
devinet_ioctl+0x7f4/0x1880

Allocated by task 87:
xfrm_state_alloc+0x1e/0x5c0
xfrm_add_sa+0xe7f/0x5820
xfrm_user_rcv_msg+0x4f3/0x940

Freed by task 57:
kmem_cache_free+0xcb/0x3d0
xfrm_state_gc_task+0x4a8/0x650
process_one_work+0x63a/0x1070

Serialize xfrm_state destruction against the deferred-device pass with a
mutex. Keep xfrm_state_dev_gc_lock limited to list operations and retain
the existing callback and device-reference release ordering.
Published: 2026-10-06
Score: 7.0 High
EPSS: < 1% Very Low
KEV: No
Impact: Kernel Use‑After‑Free memory corruption
Action: Immediate Patch
AI Analysis

Impact

The vulnerability is a race condition in the Linux kernel’s xfrm state management that can lead to a use‑after‑free of an xfrm_state object. When a device state flush occurs, the code releases its lock before invoking a driver callback that may sleep, allowing the garbage collector to free the same state concurrently. This double free corrupts kernel memory and can crash the system or provide a foothold for arbitrary code execution. The flaw is a memory‑management weakness catalogued as CWE‑416.

Affected Systems

Any instance of the Linux kernel that implements the xfrm state device cleanup routine is susceptible. The flaw exists in all kernel builds that contain the xfrm code before the upstream patch that serializes destruction is applied. This includes all mainstream distributions and custom kernels that have not yet updated to a version containing the fix.

Risk and Exploitability

The EPSS score is reported as < 1 %, indicating a very low but non‑zero likelihood of exploitation, and the vulnerability is not listed in CISA’s KEV catalog. The CVSS score of 7.0 classifies it as high severity. Despite this, a use‑after‑free in kernel code is a high‑risk flaw that can lead to denial of service or remote code execution if an attacker can trigger the race. The attack vector likely requires local privileges or manipulation of networking state, but no public exploits have been observed.

Generated by OpenCVE AI on October 10, 2026 at 01:41 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel patch that serializes xfrm_state destruction against the device state flush; the upstream commit addresses the race by keeping the lock during the driver callback and enforcing a proper release order.
  • If a kernel upgrade cannot be performed immediately, consider disabling IPsec/xfrm functionality or limiting administrative access to networking components that use the vulnerable state cleanup path, thereby reducing exposure to the race condition.
  • Monitor system logs for KASAN errors mentioning xfrm_dev_state_free and, if available, enable runtime kernel protection such as LLFI or KASAN in production systems to detect and mitigate memory‑corruption attempts.

Generated by OpenCVE AI on October 10, 2026 at 01:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4850-1 linux-6.12 security update
Debian DSA Debian DSA DSA-6568-1 linux security update
History

Sat, 10 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Moderate


Wed, 07 Oct 2026 06:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Wed, 07 Oct 2026 04:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Tue, 06 Oct 2026 12:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Tue, 06 Oct 2026 09:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: xfrm: serialize state GC with device state flush The deferred-device pass in xfrm_dev_state_flush() finds states under xfrm_state_dev_gc_lock, but drops the lock before calling xfrm_dev_state_free() because the driver callback may sleep. The device GC list does not hold an xfrm_state 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 xfrm_state_dev_gc_lock read x->xso.dev xfrm_state_gc_destroy(x) xfrm_dev_state_free(x) xfrm_state_free(x) continue xfrm_dev_state_free(x) Both paths can invoke the driver callback and drop the device reference. CPU 0 can also access the xfrm_state after CPU 1 has freed it. KASAN reported: BUG: KASAN: slab-use-after-free in xfrm_dev_state_free+0x24c/0x2a0 Read of size 8 at addr ffff88810bbaa960 by task poc/102 Call Trace: xfrm_dev_state_free+0x24c/0x2a0 xfrm_dev_state_flush+0x353/0x400 xfrm_dev_event+0x26d/0x3a0 notifier_call_chain+0xc0/0x280 __dev_notify_flags+0x169/0x250 netif_change_flags+0xe7/0x160 dev_change_flags+0x96/0x220 devinet_ioctl+0x7f4/0x1880 Allocated by task 87: xfrm_state_alloc+0x1e/0x5c0 xfrm_add_sa+0xe7f/0x5820 xfrm_user_rcv_msg+0x4f3/0x940 Freed by task 57: kmem_cache_free+0xcb/0x3d0 xfrm_state_gc_task+0x4a8/0x650 process_one_work+0x63a/0x1070 Serialize xfrm_state destruction against the deferred-device pass with a mutex. Keep xfrm_state_dev_gc_lock limited to list operations and retain the existing callback and device-reference release ordering.
Title xfrm: serialize state GC with device state flush
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-19T09:16:03.101Z

Reserved: 2026-09-25T10:25:14.328Z

Link: CVE-2026-98231

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-06T09:18:10.540

Modified: 2026-10-19T10:18:23.883

Link: CVE-2026-98231

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-06T00:00:00Z

Links: CVE-2026-98231 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-10T01:45:15Z

Weaknesses