CVE-2026-139210

tcp: reject devmem tx with fastopen and repair

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

tcp: reject devmem tx with fastopen and repair

tcp_sendmsg_locked() enforces that devmem TX can only proceed if the
zero-copy path is active and a valid dmabuf binding exists. However,
subsequent branches in tcp_sendmsg_locked() can still intercept the
message before it reaches the devmem zero-copy loop:

1. TCP Fast Open (MSG_FASTOPEN or DEFER_CONNECT):
If TCP_FASTOPEN_CONNECT is set, the socket may have a valid dst with
NETIF_F_SG (so zc == MSG_ZEROCOPY and binding is present), but
tcp_sendmsg_fastopen() -> tcp_send_syn_data() will use
copy_page_from_iter() to byte-copy from the iterator. Since iov_base
represents dma-buf offsets rather than user virtual addresses, this
misinterprets offsets as user pointers and copies the caller's memory
at those addresses into the SYN packet.

2. TCP repair mode:
If tp->repair is enabled with TCP_RECV_QUEUE, tcp_send_rcvq() similarly
calls skb_copy_datagram_from_iter(), byte-copying from the iterator.

Neither path supports or makes sense for devmem transmission. Reject
devmem sends inside the Fast Open and TCP repair branches when a devmem
binding is present. Checking inside the tp->repair branch also covers
the case where repair mode is enabled while sk_stream_wait_connect()
drops the socket lock.

Additionally, drop the !sockc_err gate from the devmem validation check
and return sockc_err if set. Otherwise, if a valid SCM_DEVMEM_DMABUF is
followed by a failing cmsg, sockc.dmabuf_id remains set while binding is
not acquired, allowing the Fast Open and TCP_RECV_QUEUE repair paths to
proceed and return before sockc_err is checked.

This pre-existing issue was identified by Sashiko AI review on commit
125755776bc6 ("tcp: reject non zerocopy devmem tx") and has not been
hit in production.

Analysis

AI-generated

Technical impact

The flaw allows a Linux kernel process that uses device memory (devmem) for zero-copy data transmission to unintentionally copy arbitrary kernel memory contents into a TCP SYN packet when the socket is configured for TCP Fast Open or uses the repair mode. This occurs because the code incorrectly treats dma‑buf offsets as user pointers, causing the kernel to read from unintended memory addresses. The result is a potential leak of sensitive memory data to network traffic, effectively exposing information beyond the intended data stream.

Affected Systems

Linux kernel operating systems that have not applied the fix for this vulnerability. The affected versions are not enumerated in the advisory; the issue is present in all kernel releases that include the vulnerable path prior to the commit that remedies the problem.

Risk and Exploitability

The vulnerability is a kernel-level flaw that could be exploited by processes capable of allocating devmem sockets and enabling Fast Open or repair mode. A successful attack would allow an attacker to read arbitrary kernel memory and send it over a TCP connection, potentially exposing confidential information. The official scores are not available, and the vulnerability is not listed in CISA’s KEV catalog. However, given that it involves a kernel memory misinterpretation, the severity can be considered high, and the exploitability requires that the attacker can control or influence socket configuration and payload. The risk is therefore moderate to high, depending on the presence of devmem usage and the local privilege level of the attacker.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the kernel to a version that contains the patch associated with commit 125755776bc6 which rejects devmem transmissions in Fast Open and repair paths
  • Disable TCP Fast Open globally with sysctl net.ipv4.tcp_fastopen=0 or in per-application settings to eliminate the attack surface originating from the Fast Open path
  • Audit and restrict processes that create devmem sockets or employ TCP repair mode, ensuring that no privileged or elevated user can enable these features unless strictly necessary

Generated by OpenCVE AI on November 30, 2026 at 20:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-20
CWE-200
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: tcp: reject devmem tx with fastopen and repair tcp_sendmsg_locked() enforces that devmem TX can only proceed if the zero-copy path is active and a valid dmabuf binding exists. However, subsequent branches in tcp_sendmsg_locked() can still intercept the message before it reaches the devmem zero-copy loop: 1. TCP Fast Open (MSG_FASTOPEN or DEFER_CONNECT): If TCP_FASTOPEN_CONNECT is set, the socket may have a valid dst with NETIF_F_SG (so zc == MSG_ZEROCOPY and binding is present), but tcp_sendmsg_fastopen() -> tcp_send_syn_data() will use copy_page_from_iter() to byte-copy from the iterator. Since iov_base represents dma-buf offsets rather than user virtual addresses, this misinterprets offsets as user pointers and copies the caller's memory at those addresses into the SYN packet. 2. TCP repair mode: If tp->repair is enabled with TCP_RECV_QUEUE, tcp_send_rcvq() similarly calls skb_copy_datagram_from_iter(), byte-copying from the iterator. Neither path supports or makes sense for devmem transmission. Reject devmem sends inside the Fast Open and TCP repair branches when a devmem binding is present. Checking inside the tp->repair branch also covers the case where repair mode is enabled while sk_stream_wait_connect() drops the socket lock. Additionally, drop the !sockc_err gate from the devmem validation check and return sockc_err if set. Otherwise, if a valid SCM_DEVMEM_DMABUF is followed by a failing cmsg, sockc.dmabuf_id remains set while binding is not acquired, allowing the Fast Open and TCP_RECV_QUEUE repair paths to proceed and return before sockc_err is checked. This pre-existing issue was identified by Sashiko AI review on commit 125755776bc6 ("tcp: reject non zerocopy devmem tx") and has not been hit in production.
Title tcp: reject devmem tx with fastopen and repair
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:32 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM