MEDIUM 5.5

CVE-2026-53197: Linux Kernel IPTFS Deadlock Vulnerability (CVSS 5.5)

A deadlock vulnerability exists in the Linux kernel's IPsec Traffic Flow Security (IPTFS) implementation. When the system destroys an IPTFS state object, it attempts to cancel two hardware timers while holding spinlocks that those same timers need to acquire. On multi-processor systems, this creates a circular wait condition where the main thread blocks waiting for timer callbacks to finish, while the timer callbacks block trying to acquire locks held by the main thread. The vulnerability was discovered through source code review rather than active exploitation.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.5 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
CWE-667
Affected products
8 configuration(s)
Published / Modified
2026-06-25 / 2026-07-06

NVD description (verbatim)

In the Linux kernel, the following vulnerability has been resolved: xfrm: iptfs: fix ABBA deadlock in iptfs_destroy_state() iptfs_destroy_state() calls hrtimer_cancel() while holding a spinlock that the timer callback also acquires, leading to an ABBA deadlock on SMP systems. For the output timer (iptfs_timer): - iptfs_destroy_state() holds x->lock, calls hrtimer_cancel() - iptfs_delay_timer() callback takes x->lock For the drop timer (drop_timer): - iptfs_destroy_state() holds drop_lock, calls hrtimer_cancel() - iptfs_drop_timer() callback takes drop_lock Both timers use HRTIMER_MODE_REL_SOFT, so their callbacks run in softirq context. When hrtimer_cancel() is called for a soft timer that is currently executing on another CPU, hrtimer_cancel_wait_running() spins on softirq_expiry_lock -- the same lock held by the softirq running the callback. If the callback is blocked waiting for the spinlock held by the caller of hrtimer_cancel(), a circular dependency forms: CPU 0: holds lock_A -> waits for softirq_expiry_lock CPU 1: holds softirq_expiry_lock -> waits for lock_A Fix by calling hrtimer_cancel() before acquiring the respective locks. hrtimer_cancel() is safe to call without holding any lock and will wait for any in-progress callback to complete. For the output timer, the lock is still acquired afterwards to drain the packet queue. For the drop timer, the lock/unlock pair is removed entirely since it only existed to serialize with the timer callback, which hrtimer_cancel() already guarantees. Found by source code audit.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-53197 is an ABBA deadlock in the Linux kernel's xfrm IPTFS module, specifically in the iptfs_destroy_state() function. The vulnerability involves two timer cancellation paths: (1) iptfs_timer (output timer) where iptfs_destroy_state() holds x->lock before calling hrtimer_cancel(), but the iptfs_delay_timer() callback also requires x->lock; and (2) drop_timer where iptfs_destroy_state() holds drop_lock before calling hrtimer_cancel(), but iptfs_drop_timer() callback also requires drop_lock. Both timers are configured with HRTIMER_MODE_REL_SOFT, causing callbacks to execute in softirq context. When hrtimer_cancel() is invoked on a soft timer executing on another CPU, it spins on softirq_expiry_lock—the same lock held by the softirq context running the callback. If the callback is blocked waiting for the spinlock held by the hrtimer_cancel() caller, a circular dependency forms: CPU 0 holds lock_A while waiting for softirq_expiry_lock, and CPU 1 holds softirq_expiry_lock while waiting for lock_A. The fix relocates hrtimer_cancel() calls to occur before acquiring the respective spinlocks, eliminating the circular wait.

Business impact

This vulnerability can cause kernel hangs and system unavailability on multi-processor systems running IPTFS-enabled configurations. IPTFS is used in IPsec deployments for traffic flow security, common in VPN gateways, secure border routers, and high-security network appliances. A deadlock in the state destruction path means that terminating IPsec connections or unloading the IPTFS module can freeze the system rather than gracefully shutting down. Organizations relying on IPsec-based security perimeters may experience unexpected service interruptions, particularly during routine maintenance or failover scenarios.

Affected systems

The vulnerability affects all Linux kernel versions with IPTFS support in the xfrm subsystem. IPTFS was introduced in the kernel to provide confidentiality for IPsec traffic patterns. Systems running Linux kernels with IPTFS compiled in or as a module, particularly on multi-core/multi-processor architectures, are susceptible. This includes enterprise routers, cloud infrastructure components, VPN appliances, and any Linux systems with active IPsec connections using IPTFS. Single-processor systems may exhibit the deadlock under extreme contention but are less likely to trigger the race condition reliably.

Exploitability

Exploitability requires local privilege escalable to create and destroy IPTFS state objects, typically necessitating CAP_NET_ADMIN capabilities or direct kernel module manipulation. No remote attack vector exists. The vulnerability manifests as a denial of service through system hang rather than privilege escalation or data compromise. Triggering requires specific IPsec configuration and intentional state destruction; casual system operation is unlikely to encounter this condition. However, legitimate administrative operations—such as reconfiguring IPsec policies, gracefully stopping VPN services, or unloading kernel modules—will reliably trigger the deadlock on affected systems.

Remediation

The fix involves refactoring iptfs_destroy_state() to call hrtimer_cancel() before acquiring spinlocks rather than within the critical section. For the output timer, the spinlock is re-acquired afterward to safely drain queued packets. For the drop timer, the spinlock/unlock pair is removed entirely since hrtimer_cancel() already serializes against callback completion. This eliminates the circular lock dependency while preserving the synchronization guarantees needed for safe resource cleanup. Kernel distributions and system administrators should apply this patch as part of their regular kernel update cycle.

Patch guidance

Patch this vulnerability by updating to a Linux kernel version incorporating the IPTFS deadlock fix. Check your distribution's kernel advisory for the specific version number addressing CVE-2026-53197. For RHEL/CentOS systems, Fedora, Ubuntu, and Debian users: consult your vendor's security bulletin for the patched kernel version. For custom or internally maintained kernels: apply the upstream fix from the Linux kernel repository, which reorders hrtimer_cancel() calls to precede spinlock acquisition in iptfs_destroy_state(). Verify the patch against the vendor advisory to confirm the exact kernel version and module configuration affected in your environment.

Detection guidance

Monitor system logs for kernel warnings or softlockup/hardlockup messages coinciding with IPsec state teardown or VPN connection termination. Kernel debug output may show warnings about suspicious spinlock contention or scheduler latency spikes. On affected systems, capture kernel traces during IPsec policy changes or service restart cycles using tools like ftrace or perf to identify lock contention patterns. Check dmesg for 'NMI watchdog' or 'BUG: soft lockup' messages. Test patch deployment in non-production IPTFS-enabled environments by intentionally restarting IPsec services and monitoring for hang conditions. Use sysstat tools to detect periods of 100% CPU utilization with no actual work progress, which may indicate kernel spinlock contention.

Why prioritize this

Assign this a medium-to-high priority in patching queues for systems actively using IPTFS, lower priority for generic Linux deployments where IPTFS is not explicitly enabled. The CVSS score of 5.5 reflects local privilege requirement and denial-of-service impact without data breach. However, the practical severity is elevated for organizations dependent on continuous IPsec availability—particularly cloud providers, ISPs, and security-focused enterprises where VPN service interruptions directly impact business continuity. Prioritize patching for production IPsec gateways and VPN concentrators; standard desktop/server systems without IPsec configuration can defer patching to the next regular maintenance window.

Risk score, explained

The CVSS v3.1 score of 5.5 (MEDIUM severity) reflects: Attack Vector Local (AV:L) requiring direct system access; Attack Complexity Low (AC:L) as the trigger is straightforward IPsec state destruction; Privileges Required Low (PR:L) as CAP_NET_ADMIN is needed; User Interaction None (UI:N); Scope Unchanged (S:U); Confidentiality None (C:N); Integrity None (I:N); Availability High (A:H) due to system hang. The score appropriately captures that this is not a remote vulnerability and causes denial of service rather than data compromise, yet the impact on system availability is severe for affected deployments.

Frequently asked questions

What is IPTFS and why do I need to care about this vulnerability?

IPTFS (IPsec Traffic Flow Security) is a Linux kernel feature that encrypts not just IPsec payload but also traffic patterns (packet sizes, timing). It's used in high-security VPN and border router deployments. This deadlock can freeze systems running IPTFS when IPsec connections are terminated or policies are reloaded, causing service interruptions. If your organization uses IPsec for secure network access or runs VPN concentrators, this affects you.

Will this deadlock happen during normal IPsec operation?

No. The deadlock occurs specifically during IPsec state destruction—when connections are explicitly torn down or the IPTFS module is unloaded. Normal encryption and decryption of traffic are not affected. However, routine maintenance activities like restarting VPN services, failover events, or policy reconfiguration will trigger the condition on unpatched systems.

Do I need to patch if my kernel is built without IPTFS support?

No. This vulnerability only affects kernels compiled with IPTFS support in the xfrm (IPsec transform) subsystem. Check your kernel configuration (CONFIG_XFRM_IPTFS) or consult your distribution's kernel options. Distributions that have not enabled IPTFS by default are not vulnerable.

What should I do if I can't patch immediately?

As a temporary operational workaround, avoid frequent IPsec state changes and service restarts on systems using IPTFS. Plan IPsec policy updates during maintenance windows and schedule them separately to minimize the number of state destruction events. This is not a long-term solution and should be paired with a patching schedule. Monitor logs closely for signs of system hang during IPsec operations.

This analysis is based on the vulnerability description and publicly available information as of the publish date. The CVSS score, vulnerability status, and affected product list are derived from authoritative sources and should be verified against vendor advisories for your specific environment. Patch version numbers and availability dates vary by distribution and should be confirmed directly with your vendor. This information is provided for security awareness and remediation planning; organizations should conduct their own risk assessment based on their deployment architecture and IPsec usage. No exploit code or weaponizable proof-of-concept is provided or discussed. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).