CVE-2026-43254
JSON

7.5high

ovpn: tcp - fix packet extraction from stream

Severity
7.5high CVSS:3.1 by Linux
Exploit likelihood
0.45% (higher than 40% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: ovpn: tcp - fix packet extraction from stream When processing TCP stream data in ovpn_tcp_recv, we receive large cloned skbs from __strp_rcv that may contain multiple coalesced packets. The current implementation has two bugs: 1. Header offset overflow: Using pskb_pull with large offsets on coalesced skbs causes skb->data - skb->head to exceed the u16 storage of skb->network_header. This causes skb_reset_network_header to fail on the inner decapsulated packet, resulting in packet drops. 2. Unaligned protocol headers: Extracting packets from arbitrary positions within the coalesced TCP stream provides no alignment guarantees for the packet data causing performance penalties on architectures without efficient unaligned access. Additionally, openvpn's 2-byte length prefix on TCP packets causes the subsequent 4-byte opcode and packet ID fields to be inherently misaligned. Fix both issues by allocating a new skb for each openvpn packet and using skb_copy_bits to extract only the packet content into the new buffer, skipping the 2-byte length prefix. Also, check the length before invoking the function that performs the allocation to avoid creating an invalid skb. If the packet has to be forwarded to userspace the 2-byte prefix can be pushed to the head safely, without misalignment. As a side effect, this approach also avoids the expensive linearization that pskb_pull triggers on cloned skbs with page fragments. In testing, this resulted in TCP throughput improvements of up to 74%.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 11851cbd60ea1e5abbd97619d69845ead99303d6 before 0315bec883c67fa1413c61e504a28dc5bd02eb37, from 11851cbd60ea1e5abbd97619d69845ead99303d6 before 7dba6cd7fb168d7615194a631c9c100c1c224131, from 11851cbd60ea1e5abbd97619d69845ead99303d6 before d4f687fbbce45b5e88438e89b5e26c0c15847992, 6.16
Not affected: before 6.16, from 6.18.16 up to 6.18.*, from 6.19.6 up to 6.19.*, from 7.0 up to *
CVE List
linux linux_kernelfrom 6.16 before 6.18.16, from 6.19 before 6.19.6, 7.0NVD

Classification

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: ovpn: tcp - fix packet extraction from stream When processing TCP stream data in ovpn_tcp_recv, we receive large cloned skbs from __strp_rcv that may contain multiple coalesced packets. The current implementation has two bugs: 1. Header offset overflow: Using pskb_pull with large offsets on coalesced skbs causes skb->data - skb->head to exceed the u16 storage of skb->network_header. This causes skb_reset_network_header to fail on the inner decapsulated packet, resulting in packet drops. 2. Unaligned protocol headers: Extracting packets from arbitrary positions within the coalesced TCP stream provides no alignment guarantees for the packet data causing performance penalties on architectures without efficient unaligned access. Additionally, openvpn's 2-byte length prefix on TCP packets causes the subsequent 4-byte opcode and packet ID fields to be inherently misaligned. Fix both issues by allocating a new skb for each openvpn packet and using skb_copy_bits to extract only the packet content into the new buffer, skipping the 2-byte length prefix. Also, check the length before invoking the function that performs the allocation to avoid creating an invalid skb. If the packet has to be forwarded to userspace the 2-byte prefix can be pushed to the head safely, without misalignment. As a side effect, this approach also avoids the expensive linearization that pskb_pull triggers on cloned skbs with page fragments. In testing, this resulted in TCP throughput improvements of up to 74%.

NVD (es)

En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: ovpn: tcp - corrige la extracción de paquetes del flujo Al procesar datos de flujo TCP en ovpn_tcp_recv, recibimos skbs clonados grandes de __strp_rcv que pueden contener múltiples paquetes fusionados. La implementación actual tiene dos errores: 1. Desbordamiento de desplazamiento de cabecera: Usar pskb_pull con grandes desplazamientos en skbs fusionados hace que skb -> data - skb -> head exceda el almacenamiento u16 de skb -> network_header. Esto hace que skb_reset_network_header falle en el paquete interno desencapsulado, lo que resulta en pérdidas de paquetes. 2. Cabeceras de protocolo no alineadas: Extraer paquetes de posiciones arbitrarias dentro del flujo TCP fusionado no proporciona garantías de alineación para los datos del paquete, causando penalizaciones de rendimiento en arquitecturas sin acceso no alineado eficiente. Además, el prefijo de longitud de 2 bytes de openvpn en los paquetes TCP hace que los campos subsiguientes de código de operación de 4 bytes e ID de paquete estén inherentemente desalineados. Soluciona ambos problemas asignando un nuevo skb para cada paquete openvpn y usando skb_copy_bits para extraer solo el contenido del paquete en el nuevo búfer, omitiendo el prefijo de longitud de 2 bytes. Además, verifica la longitud antes de invocar la función que realiza la asignación para evitar crear un skb inválido. Si el paquete tiene que ser reenviado al espacio de usuario, el prefijo de 2 bytes puede ser empujado a la cabecera de forma segura, sin desalineación. Como efecto secundario, este enfoque también evita la costosa linealización que pskb_pull desencadena en skbs clonados con fragmentos de página. En las pruebas, esto resultó en mejoras de rendimiento TCP de hasta el 74%.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-43254 changed 2026-08-05CVE Terms of Use
NVDCVE-2026-43254 changed 2026-11-11Public domain