Re: [PATCH bpf v2] bpf: tcp: Fix use-after-free in bpf_iter_tcp_established_batch()

"Jose Fernandez (Anthropic)" <[email protected]>
Newsgroups dev.linux.lists.sashiko-reviews,org.kernel.vger.bpf
Message-ID <[email protected]>
On Tue, Jul 21, 2026 at 09:24:05PM +0200, Kumar Kartikeya Dwivedi wrote:
> On Fri Jul 17, 2026 at 4:52 AM CEST, sashiko-bot wrote:
> > [Severity: Low]
> > Does this multi-line comment follow the BPF subsystem comment style?
> > The BPF subsystem guide expects the opening block to be on its own line:

On the comment-style note, checkpatch accepts both block comment forms
and the one used here matches the surrounding code in
net/ipv4/tcp_ipv4.c, so I don't think the bot's flag applies. Either way
is fine by me, whatever the maintainers prefer.

> > Pre-existing issues:
> > - [High] Double-put and wild pointer dereference of batch sockets on the
> > first bpf_iter_tcp_realloc_batch failure path.
>
> Hi Kuniyuki,
> Thoughts on the fix and Sashiko's concern? (The latter should be probably be
> fixed separately, if needed).

The double-put is pre-existing and already fixed separately by
980a81345275 ("bpf: tcp: fix double sock release on batch realloc"),
now in the bpf tree. The hunks are disjoint, so this series applies
cleanly on top of it.

Thanks,
Jose
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.