Re: [PATCH net] bpf: tcp: fix double sock release on batch realloc

From: patchwork-bot+netdevbpf

Date: Thu Jul 23 2026 - 06:37:10 EST


Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@xxxxxxxxxx>:

On Mon, 13 Jul 2026 23:32:30 +0000 you wrote:
> bpf_iter_tcp_batch() releases the current batch via
> bpf_iter_tcp_put_batch(), which drops the socket refs and rewrites
> each slot with the socket cookie, then grows the batch. cur_sk/end_sk
> are kept for bpf_iter_tcp_resume(), but on realloc failure the function
> returns ERR_PTR() before resume runs, leaving cur_sk < end_sk over
> slots that now hold cookies rather than sock pointers.
> bpf_iter_tcp_seq_stop() then calls bpf_iter_tcp_put_batch() again and
> dereferences a cookie as a struct sock.
>
> [...]

Here is the summary with links:
- [net] bpf: tcp: fix double sock release on batch realloc
https://git.kernel.org/netdev/net/c/980a81345275

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