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

xfrm: clear mode callbacks after failed mode setup

xfrm_state_gc_task can run long after a failed IPTFS state setup. In the
reproduced case, __xfrm_init_state() cached x->mode_cbs, IPTFS setup
returned -ENOMEM before publishing mode_data, and the temporary module
reference from xfrm_get_mode_cbs() was dropped immediately. The dead state
then kept x->mode_cbs until deferred GC ran after xfrm_iptfs had been
unloaded.

Clear x->mode_cbs when mode init or clone fails before publishing
mode_data. Those states never installed mode-specific state or the
long-term IPTFS module pin, so deferred GC has nothing mode-specific to
destroy and must not retain a callback table pointer past the temporary
lookup reference.

The buggy scenario involves two paths, with each column showing the order
within that path:

failed setup path:
1. cache x->mode_cbs
2. mode setup fails before mode_data
3. drop the temporary module ref
4. dead state keeps x->mode_cbs cached

GC/unload path:
1. xfrm_state_put() queues GC work
2. xfrm_iptfs unloads later
3. xfrm_state_gc_task runs
4. GC dereferences stale x->mode_cbs

This also covers the failed clone path where clone_state() returns before
publishing mode_data.

Validation reproduced this kernel report:
Kernel panic - not syncing: Fatal exception
CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
failslab_stacktrace_filter matched xfrm_iptfs frames
ack_error=-12
FAULT_INJECTION: forcing a failure
BUG: unable to handle page fault
Workqueue: events xfrm_state_gc_task
RIP: xfrm_state_gc_task+0x142/0x650
Modules linked in: esp4_offload xfrm_user [last unloaded: xfrm_iptfs]
Kernel panic - not syncing: Fatal exception
Published: 2026-08-10
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability lies in the Linux kernel’s xfrm framework, which manages IPsec state objects. When a new state is created, the framework caches a callbacks table (x->mode_cbs) while attempting to initialise the mode. If the mode initialisation fails before the mode data is published, the temporary module reference is dropped but the cached callbacks remain. A later garbage‑collection task then dereferences this stale pointer, leading to a kernel panic. The result is an immediate denial of service; the operating system crashes and must be rebooted.

Affected Systems

All Linux systems running kernel versions that contain the buggy xfrm_state_gc_task logic are potentially affected. The CVE description does not list specific affected releases, and the CNA did not provide version bounds. In the absence of version data, the assumption is that any kernel build prior to the patch that introduced the fix is vulnerable.

Risk and Exploitability

The CVSS score is not provided, but the impact is severe (kernel crash). The EPSS score is missing; the issue is not listed in CISA’s KEV catalog, which suggests no known exploits. Nevertheless, the flaw can be triggered via a failed IPTFS setup, which can be achieved by an attacker with the ability to inject bad configuration or load a malicious module. Due to the local nature of the packet processing and module operations, the attack is likely limited to hosts that can access the vulnerable system or that run the affected module, but a compromised module could trigger the panic. The risk is high due to the catastrophic reliability impact, even if the exploitation probability is uncertain.

Generated by OpenCVE AI on August 10, 2026 at 16:02 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that contains the xfrm_state_gc_task fix and reboot the system.
  • If an immediate kernel update is not possible, unload or disable the xfrm_iptfs IPsec module with "modprobe -r xfrm_iptfs" and ensure that no active IPsec tunnels are in use until the patch is applied.
  • Continuously monitor system logs (e.g., /var/log/kern.log) for "xfrm_state_gc_task" crashes and investigate any kernel panics to confirm that the issue has been resolved.

Generated by OpenCVE AI on August 10, 2026 at 16:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 10 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416
CWE-773

Mon, 10 Aug 2026 12:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: xfrm: clear mode callbacks after failed mode setup xfrm_state_gc_task can run long after a failed IPTFS state setup. In the reproduced case, __xfrm_init_state() cached x->mode_cbs, IPTFS setup returned -ENOMEM before publishing mode_data, and the temporary module reference from xfrm_get_mode_cbs() was dropped immediately. The dead state then kept x->mode_cbs until deferred GC ran after xfrm_iptfs had been unloaded. Clear x->mode_cbs when mode init or clone fails before publishing mode_data. Those states never installed mode-specific state or the long-term IPTFS module pin, so deferred GC has nothing mode-specific to destroy and must not retain a callback table pointer past the temporary lookup reference. The buggy scenario involves two paths, with each column showing the order within that path: failed setup path: 1. cache x->mode_cbs 2. mode setup fails before mode_data 3. drop the temporary module ref 4. dead state keeps x->mode_cbs cached GC/unload path: 1. xfrm_state_put() queues GC work 2. xfrm_iptfs unloads later 3. xfrm_state_gc_task runs 4. GC dereferences stale x->mode_cbs This also covers the failed clone path where clone_state() returns before publishing mode_data. Validation reproduced this kernel report: Kernel panic - not syncing: Fatal exception CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y failslab_stacktrace_filter matched xfrm_iptfs frames ack_error=-12 FAULT_INJECTION: forcing a failure BUG: unable to handle page fault Workqueue: events xfrm_state_gc_task RIP: xfrm_state_gc_task+0x142/0x650 Modules linked in: esp4_offload xfrm_user [last unloaded: xfrm_iptfs] Kernel panic - not syncing: Fatal exception
Title xfrm: clear mode callbacks after failed mode setup
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-08-10T12:04:35.425Z

Reserved: 2026-07-30T09:28:09.391Z

Link: CVE-2026-68415

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-10T16:15:04Z

Weaknesses
  • CWE-416

    Use After Free

  • CWE-773

    Missing Reference to Active File Descriptor or Handle