CVE-2026-64009 in Linuxinfo

Summary

by MITRE • 07/19/2026

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

xfrm: Check for underflow in xfrm_state_mtu

Leo Lin reported OOB write issue in esp component:

xfrm_state_mtu() returns u32 but performs its arithmetic in unsigned modulo-2^32 space using an attacker-influenced "header_len + authsize + net_adj" subtracted from a small "mtu" argument. A nobody user can install an IPv4 ESP tunnel SA with a large authentication key (XFRMA_ALG_AUTH_TRUNC, e.g. hmac(sha512), 64-byte key, 64-byte trunc), configure a small interface MTU (68 bytes), and set XFRMA_TFCPAD to a large value. When a single UDP datagram is then sent through the tunnel, xfrm_state_mtu() underflows to a near-2^32 value, and esp_output() consumes it as a signed int via:

padto = min(x->tfcpad, xfrm_state_mtu(x, mtu_cached)) esp.tfclen = padto - skb->len (assigned to int)

esp.tfclen ends up negative (e.g. -207). It is sign-extended to size_t when passed to memset() inside esp_output_fill_trailer(), producing a ~16 EB write of zeroes at skb_tail_pointer(skb). KASAN logs it as "Write of size 18446744073709551537 at addr ffff888...".

Check for underflow and return 1. This causes the sendmsg attempt to fail with ENETUNREACH.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 07/19/2026

The vulnerability in question involves a critical out-of-bounds write condition within the Linux kernel's IPsec implementation, specifically affecting the xfrm subsystem and ESP (Encapsulating Security Payload) component. This flaw stems from improper handling of arithmetic operations in unsigned 32-bit integer space, creating a scenario where an attacker can manipulate the system into performing invalid memory operations. The vulnerability is categorized under CWE-191 Integer Underflow (Wrap or Wraparound) which directly relates to the modulo-2^32 arithmetic that fails to account for potential negative results when computing MTU values.

The technical implementation of this flaw occurs within the xfrm_state_mtu() function which returns a u32 value but performs its calculations using unsigned 32-bit arithmetic that can wrap around. When an attacker configures an IPv4 ESP tunnel with specific parameters including a large authentication key (such as hmac(sha512) with 64-byte key and 64-byte truncation), sets a small interface MTU (68 bytes), and configures XFRMA_TFCPAD to a large value, the arithmetic operation results in a negative value that gets sign-extended to size_t. This causes the esp_output_fill_trailer() function to attempt an enormous memory write operation of approximately 16 exabytes, far exceeding normal system memory capacity.

The operational impact of this vulnerability is severe as it allows for a local unprivileged user to potentially trigger a kernel memory corruption condition that could lead to system instability or privilege escalation. The attack vector requires the attacker to have the ability to install an ESP tunnel SA and configure specific parameters, but once executed, the resulting memory write operation can corrupt kernel memory structures. This vulnerability directly maps to ATT&CK technique T1068, Privilege Escalation through exploitation of kernel vulnerabilities, and T1059, Command and Scripting Interpreter, as it enables malicious code execution within kernel space.

The fix implemented addresses the root cause by adding proper underflow checking in the xfrm_state_mtu() function, returning a value of 1 when underflow is detected to prevent the subsequent memory operations from proceeding with invalid parameters. This approach aligns with defensive programming practices and follows the principle of least privilege by ensuring that invalid configuration combinations cannot lead to kernel memory corruption. The solution prevents the escalation path that would otherwise allow an attacker to perform massive memory writes, effectively neutralizing the potential for system compromise through this specific vulnerability pathway.

Responsible

Linux

Reservation

07/19/2026

Disclosure

07/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!