{"id":"CVE-2026-139210","aliases":["CVE-2026-139210"],"related":[],"kind":"vulnerability","state":"published","title":"tcp: reject devmem tx with fastopen and repair","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: reject devmem tx with fastopen and repair\n\ntcp_sendmsg_locked() enforces that devmem TX can only proceed if the\nzero-copy path is active and a valid dmabuf binding exists. However,\nsubsequent branches in tcp_sendmsg_locked() can still intercept the\nmessage before it reaches the devmem zero-copy loop:\n\n1. TCP Fast Open (MSG_FASTOPEN or DEFER_CONNECT):\n   If TCP_FASTOPEN_CONNECT is set, the socket may have a valid dst with\n   NETIF_F_SG (so zc == MSG_ZEROCOPY and binding is present), but\n   tcp_sendmsg_fastopen() -> tcp_send_syn_data() will use\n   copy_page_from_iter() to byte-copy from the iterator. Since iov_base\n   represents dma-buf offsets rather than user virtual addresses, this\n   misinterprets offsets as user pointers and copies the caller's memory\n   at those addresses into the SYN packet.\n\n2. TCP repair mode:\n   If tp->repair is enabled with TCP_RECV_QUEUE, tcp_send_rcvq() similarly\n   calls skb_copy_datagram_from_iter(), byte-copying from the iterator.\n\nNeither path supports or makes sense for devmem transmission. Reject\ndevmem sends inside the Fast Open and TCP repair branches when a devmem\nbinding is present. Checking inside the tp->repair branch also covers\nthe case where repair mode is enabled while sk_stream_wait_connect()\ndrops the socket lock.\n\nAdditionally, drop the !sockc_err gate from the devmem validation check\nand return sockc_err if set. Otherwise, if a valid SCM_DEVMEM_DMABUF is\nfollowed by a failing cmsg, sockc.dmabuf_id remains set while binding is\nnot acquired, allowing the Fast Open and TCP_RECV_QUEUE repair paths to\nproceed and return before sockc_err is checked.\n\nThis pre-existing issue was identified by Sashiko AI review on commit\n125755776bc6 (\"tcp: reject non zerocopy devmem tx\") and has not been\nhit in production.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: reject devmem tx with fastopen and repair\n\ntcp_sendmsg_locked() enforces that devmem TX can only proceed if the\nzero-copy path is active and a valid dmabuf binding exists. However,\nsubsequent branches in tcp_sendmsg_locked() can still intercept the\nmessage before it reaches the devmem zero-copy loop:\n\n1. TCP Fast Open (MSG_FASTOPEN or DEFER_CONNECT):\n   If TCP_FASTOPEN_CONNECT is set, the socket may have a valid dst with\n   NETIF_F_SG (so zc == MSG_ZEROCOPY and binding is present), but\n   tcp_sendmsg_fastopen() -> tcp_send_syn_data() will use\n   copy_page_from_iter() to byte-copy from the iterator. Since iov_base\n   represents dma-buf offsets rather than user virtual addresses, this\n   misinterprets offsets as user pointers and copies the caller's memory\n   at those addresses into the SYN packet.\n\n2. TCP repair mode:\n   If tp->repair is enabled with TCP_RECV_QUEUE, tcp_send_rcvq() similarly\n   calls skb_copy_datagram_from_iter(), byte-copying from the iterator.\n\nNeither path supports or makes sense for devmem transmission. Reject\ndevmem sends inside the Fast Open and TCP repair branches when a devmem\nbinding is present. Checking inside the tp->repair branch also covers\nthe case where repair mode is enabled while sk_stream_wait_connect()\ndrops the socket lock.\n\nAdditionally, drop the !sockc_err gate from the devmem validation check\nand return sockc_err if set. Otherwise, if a valid SCM_DEVMEM_DMABUF is\nfollowed by a failing cmsg, sockc.dmabuf_id remains set while binding is\nnot acquired, allowing the Fast Open and TCP_RECV_QUEUE repair paths to\nproceed and return before sockc_err is checked.\n\nThis pre-existing issue was identified by Sashiko AI review on commit\n125755776bc6 (\"tcp: reject non zerocopy devmem tx\") and has not been\nhit in production.","source":"cvelist"}],"published":"2026-11-30T13:32:35.915Z","modified":"2026-11-30T14:18:41.017Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"bd61848900bff597764238f3a8ec67c815cd316e","fixed":"3c7bf219b8a366277f3aece661a2c09dcb85ae15","status":"affected"},{"type":"git","introduced":"bd61848900bff597764238f3a8ec67c815cd316e","fixed":"c64d34f285267e5eabadd677cc2c89447d51d5d1","status":"affected"},{"type":"git","introduced":"bd61848900bff597764238f3a8ec67c815cd316e","fixed":"89b9db72918bc209029fad8cccc42191b498d511","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.16","status":"unaffected"},{"type":"semver","introduced":"6.18.65","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/3c7bf219b8a366277f3aece661a2c09dcb85ae15","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c64d34f285267e5eabadd677cc2c89447d51d5d1","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/89b9db72918bc209029fad8cccc42191b498d511","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139210","url":"https://www.cve.org/CVERecord?id=CVE-2026-139210","licence":"CVE Terms of Use","modified":"2026-11-30T13:32:35.915Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139210","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139210","licence":"Public domain","modified":"2026-11-30T14:18:41.017Z"}],"updatedAt":"2026-11-30T14:32:31.542Z","epss":{"score":0.00198,"percentile":0.10121,"date":"2026-12-01T12:00:22.000Z"}}