CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-72137

CVE-2026-72137: Double Free in Linux Kernel XFRM NAT Keepalive

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 6, 2026·7 min read·17 visits

Executive Summary (TL;DR)

A double-free vulnerability in the Linux kernel XFRM subsystem allows error-handling paths to release a socket buffer twice, causing kernel crashes or potential local privilege escalation.

CVE-2026-72137 is a critical double-free vulnerability in the Linux kernel's XFRM (IPsec) subsystem. The vulnerability occurs when the kernel attempts to send NAT keepalive packets over UDP. Under specific transmission failure conditions, both the downstream networking stack and the upstream keepalive dispatcher attempt to free the same socket buffer (sk_buff) structure, leading to kernel memory corruption, denial of service, or potential local privilege escalation.

Vulnerability Overview

The Linux kernel IPsec framework (XFRM) subsystem implements Network Address Translation (NAT) keepalives to maintain stateful NAT bindings for UDP-encapsulated Encapsulating Security Payload (ESP) traffic. When configured, this subsystem periodically generates keepalive packets to prevent intermediate NAT gateways from expiring connection states.

This background keepalive mechanism uses nat_keepalive_send() to allocate, format, and dispatch socket buffer structures (sk_buff) down the network stack. A critical software flaw in this interface allows an allocated socket buffer to be freed twice under specific error conditions. This vulnerability is classified as a double-free memory corruption issue (CWE-415).

The vulnerability is triggered when the IPv4 or IPv6 helper functions encounter a transmission error after the networking stack has assumed ownership of the socket buffer. An attacker capable of inducing network-level or routing-level errors during keepalive transmission can exploit this vulnerability to corrupt kernel memory allocator structures, resulting in a system crash or potentially local privilege escalation.

Root Cause Analysis

In the Linux kernel's networking stack, socket buffer (sk_buff or skb) lifetime management is governed by strict ownership rules. When a socket buffer is passed to a downstream transmission function such as ip_build_and_send_pkt() or ip6_xmit(), the ownership of that structure is transferred to the receiving subsystem. If an error occurs during downstream processing, the receiving subsystem is responsible for freeing the skb and propagating the error code back up the execution chain.

Prior to the patch, the nat_keepalive_send() function in net/xfrm/xfrm_nat_keepalive.c violated these ownership rules. The function dispatched the skb to family-specific helper functions (nat_keepalive_send_ipv4() or nat_keepalive_send_ipv6()) and monitored the return code. If the helpers returned an error, the caller assumed it still owned the packet and invoked kfree_skb(skb) to clean up the buffer.

However, if the error was encountered after the helper had already passed the skb to the downstream transmission functions, those downstream functions had already executed their own cleanup paths, freeing the skb internally. Consequently, the secondary call to kfree_skb() inside nat_keepalive_send() attempted to free an already deallocated memory chunk. This pattern triggers a classic double-free condition within the kernel slab or slub allocator.

Code-Level Patch Analysis

The remediation of this vulnerability involves restructuring the boundaries of socket buffer ownership within the NAT keepalive execution path. The patch moves the cleanup responsibility of the sk_buff structure into the individual IPv4 and IPv6 helper functions, isolating the main caller from downstream state changes.

// In net/xfrm/xfrm_nat_keepalive.c
static int nat_keepalive_send_ipv4(struct sk_buff *skb,
				   struct nat_keepalive *ka)
{
	// ...
	rt = ip_route_output_key(net, &fl4);
- 	if (IS_ERR(rt))
+ 	if (IS_ERR(rt)) {
+ 		kfree_skb(skb); // Free skb if route lookup fails before handoff
		return PTR_ERR(rt);
+ 	}
static void nat_keepalive_send(struct nat_keepalive *ka)
{
	// ...
	switch (ka->family) {
	case AF_INET:
- 		err = nat_keepalive_send_ipv4(skb, ka);
+ 		nat_keepalive_send_ipv4(skb, ka); // Caller no longer tracks error for cleanup
		break;
#if IS_ENABLED(CONFIG_IPV6)
	case AF_INET6:
- 		err = nat_keepalive_send_ipv6(skb, ka, uh);
+ 		nat_keepalive_send_ipv6(skb, ka, uh);
		break;
#endif
+	default:
+		kfree_skb(skb); // Clean up only if address family is completely unsupported
+		break;
	}
- 	if (err)
- 		kfree_skb(skb); // REMOVED: No longer double-frees skb on downstream errors
}

By refactoring the code, the caller nat_keepalive_send() is restricted to allocating the buffer, dispatching it to the helpers, and freeing it only in the default case where the IP family is unsupported. If a routing or translation error occurs pre-handoff inside nat_keepalive_send_ipv4() or nat_keepalive_send_ipv6(), the helper frees the buffer locally. If the handoff is successful, the downstream networking layers handle memory deallocation entirely, ensuring no double-free condition can be triggered.

Exploitation Mechanics and Prerequisites

Exploitation of this vulnerability requires specific environmental and configuration prerequisites. The target system must be configured to use IPsec (XFRM) with NAT keepalives active. This occurs typically in environments using UDP-encapsulated ESP (IPsec NAT-Traversal) to bypass network address translation gateways.

To trigger the vulnerable code path, an attacker must induce a transmission error after the socket buffer has been handed off to the IP routing or output queues. This state can be forced by dynamically altering the host's routing tables, or by inducing rapid link-state transitions (interface flapping) during the keepalive interval. If the downstream stack encounters a routing lookup or transmission failure, it frees the packet and returns an error code, triggering the second free in the unpatched keepalive caller.

No public proof-of-concept (PoC) code or weaponized exploits currently exist for this vulnerability. In a local privilege escalation scenario, an attacker could attempt a heap spray attack targeting the kmalloc-X slab caches used for socket buffers. By placing structured payloads in the deallocated memory slot between the first and second free operations, the second free could release a control-structure buffer, facilitating a use-after-free (UAF) condition that enables kernel control-flow hijacking.

Security and System Impact

The security impact of a kernel-level double-free vulnerability is severe, as reflected in its CVSS score of 9.8. Because the flaw exists within the core memory allocator of the Linux kernel, any execution of the vulnerable path corrupts the allocator's internal tracking lists (such as the SLUB freelist pointers). This corruption typically leads to immediate kernel panic, causing a complete denial of service (DoS) for the affected host.

Beyond denial of service, memory corruption vulnerabilities of this class can be leveraged for privilege escalation. If an attacker can control the layout of the kernel heap during the execution of the double-free sequence, they may manipulate allocator metadata to return overlapping memory chunks. This enables arbitrary write capabilities in kernel space, allowing an unprivileged local user to escalate privileges to root or execute arbitrary kernel code.

The remote exploitation vector is limited by the requirement to trigger a send error on the keepalive path. While the CVSS vector identifies Network (AV:N) access, triggering the failure path from a remote position is highly complex and depends on the attacker's ability to manipulate the host's route resolution or network interfaces. Consequently, the practical risk is highest in scenarios where a local attacker or a compromised container has access to raw sockets or routing parameters.

Remediation and Defensive Strategies

The primary and recommended mitigation is the application of the official Linux kernel patches. The vulnerability has been resolved in the main development branch and backported to active stable branches. Systems running the 6.12, 6.13, 6.18, or 7.1 stable branches must be upgraded to version 6.12.101, 6.18.40, 7.1.5, or newer, respectively.

In environments where immediate kernel upgrades are not feasible, administrative workarounds can be applied to reduce exposure. Administrators can disable UDP-encapsulated IPsec (NAT-Traversal) if it is not strictly required by the environment's network architecture. Disabling NAT-T prevents the initialization of the XFRM keepalive workers, effectively closing the vulnerable code path.

Additionally, restricting access to network configuration capabilities helps mitigate local exploitation. Ensuring that containers and unprivileged local users do not possess the CAP_NET_ADMIN capability limits their ability to manipulate routing tables or interface states. This restriction prevents the dynamic network manipulation required to trigger the downstream transmission errors that lead to the double-free condition.

Fix Analysis (2)

Technical Appendix

CVSS Score
9.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
0.67%
Top 50% most exploited

Affected Systems

Linux Kernel versions 6.11 through 6.12.100Linux Kernel versions 6.13 through 6.18.39Linux Kernel versions 6.19 through 7.1.4

Affected Versions Detail

Product
Affected Versions
Fixed Version
Linux Kernel
Linux
[6.11.0, 6.12.101)6.12.101
Linux Kernel
Linux
[6.13.0, 6.18.40)6.18.40
Linux Kernel
Linux
[6.19.0, 7.1.5)7.1.5
AttributeDetail
CWE IDCWE-415 (Double Free)
Attack VectorNetwork (AV:N)
CVSS Score9.8 (Critical)
EPSS Score0.00671 (Percentile: 50.32%)
Exploit StatusNone (No public exploit available)
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-415
Double Free

Double-freeing a socket buffer (sk_buff) when handling NAT keepalive failures.

Vulnerability Timeline

Mainline patch proposed and committed in torvalds/linux (226f4a490d1a938fc838d8f8c46a4eca864c0d78)
2026-06-25
Backported fix committed to stable branch (d0a4dc7efa825bce60a8da8f7d43c864a159abde)
2026-07-27
CVE-2026-72137 officially published
2026-08-15
NVD updates and analyzes the vulnerability record
2026-08-17

References & Sources

  • [1]Official NVD Registry
  • [2]Official CVE Record
  • [3]Kernel Mainline Patch
  • [4]Wiz Vulnerability Database Listing

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•26 minutes ago•CVE-2026-126303
8.7

CVE-2026-126303: Uncontrolled Resource Consumption in NLTK SteppingRecursiveDescentParser

CVE-2026-126303 (GHSA-8fx7-8jr8-84rv) is an uncontrolled resource consumption vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. The flaw is located in the SteppingRecursiveDescentParser.parse() method within the nltk.parse.recursivedescent module. Because the parser executes a top-down recursive descent stepping loop without enforcing an execution time deadline or step limit, processing tokens against a left-recursive, self-embedding, or ambiguous Context-Free Grammar (CFG) causes the parser to enter an infinite loop. This results in complete CPU core exhaustion and worker thread starvation, leading to an application-level denial of service.

Alon Barad
Alon Barad
0 views•10 min read
•about 1 hour ago•CVE-2026-62683
3.1

CVE-2026-62683: Incorrect Authorization via Stale Public Shares in File Browser

File Browser versions prior to 2.63.17 contain an authorization and state-management flaw in the BoltDB storage backend. When an authenticated user deletes a shared directory via an HTTP request with a trailing slash (e.g., DELETE /api/resources/a/), the share cleanup routine queries the database index using the unnormalized path before stripping the trailing slash. Because canonical share paths are stored without trailing slashes (e.g., /a), the database prefix query fails to match the parent directory share record. If a directory with the same name is later recreated, the dormant public share hash automatically reactivates and exposes the new directory contents to unauthenticated users.

Alon Barad
Alon Barad
2 views•10 min read
•about 2 hours ago•CVE-2026-62297
7.5

CVE-2026-62297: Uncontrolled Memory Allocation and Denial of Service in ag-psd

An uncontrolled memory allocation vulnerability exists in ag-psd versions prior to 31.0.0. When parsing Adobe Photoshop Document (PSD) files, the readPsd() function reads image dimensions and color depth directly from the file header and allocates off-heap typed arrays without validating whether the requested memory size is proportional to the input stream or bounded by operational thresholds. An unauthenticated attacker can supply a crafted 52-byte PSD payload that triggers an immediate 3.35 GB memory allocation, resulting in process termination via the operating system Out-Of-Memory (OOM) killer.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 3 hours ago•CVE-2026-126297
7.5

CVE-2026-126297: Algorithmic Complexity Denial of Service in NLTK ConllCorpusReader

CVE-2026-126297 (GHSA-v8f3-6phw-6mh9) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. Located in the Semantic Role Labeling (SRL) parser within `nltk/corpus/reader/conll.py`, the flaw allows an attacker to trigger quadratic O(N^2) CPU processing overhead by providing crafted CoNLL-formatted corpus inputs containing decoy span columns or nested full-width verb spans. Applications parsing untrusted linguistic corpora can experience prolonged CPU exhaustion and application-level Denial of Service (DoS).

Amit Schendel
Amit Schendel
3 views•12 min read
•about 4 hours ago•CVE-2026-126298
7.5

CVE-2026-126298: Quadratic Algorithmic Complexity Denial of Service in NLTK Tree.chomsky_normal_form

CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.

Alon Barad
Alon Barad
6 views•12 min read
•about 5 hours ago•CVE-2026-126299
7.5

CVE-2026-126299: Quadratic Algorithmic Complexity Denial of Service in NLTK CCG Lexicon Parser

An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.

Alon Barad
Alon Barad
5 views•10 min read