Re: [PATCH net v2] tcp: reject devmem tx with fastopen and repair

From: patchwork-bot+netdevbpf

Date: Fri Oct 23 2026 - 15:30:23 EST


Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Mon, 19 Oct 2026 17:45:22 +0000 you wrote:
> 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.
>
> [...]

Here is the summary with links:
- [net,v2] tcp: reject devmem tx with fastopen and repair
https://git.kernel.org/netdev/net/c/89b9db72918b

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html