Re: [PATCH net v2 1/2] tcp: diag: bound bucket lock hold in tcp_diag_dump()

From: zihan xi

Date: Mon Sep 07 2026 - 03:46:32 EST


On Mon, Sep 7, 2026 at 3:15 PM zihan xi <zihanx@xxxxxxxxxx> wrote:
>
> On Mon, Sep 7, 2026 at 3:06 PM Eric Dumazet <edumazet@xxxxxxxxxx> wrote:
> >
> > > - bind cursor UAF / dangling tb2: valid
> > > - unconditional sock_hold() on unpublished TIME_WAIT: valid
> > > - clearing s_num on cursor mismatch: valid
> > > - lockless cursor-membership checks: valid as a concern
> > > - commit message overstating bind/ehash fill-under-lock: valid
> > > - missing note that MPTCP needs the follow-up patch: valid as a
> > > backport note
> > > - endless re-scan of the same bucket head: not valid as a
> > > guaranteed livelock; duplicate output after a rejected cursor
> > > is valid
> >
> > I just saw your patch today. This is absolutely insane.
> >
> > Please limit the complexity of a filter to something reasonable.
> > Absolutely no sane user is using a very complex filter.
> >
> > Same for UDP.
>
> Thanks for the feedback.
>
> We will drop the dump-cursor rewrite.
>
> A follow-up can cap inet_diag bytecode complexity in
> inet_diag_bc_audit() so TCP, UDP and MPTCP dumps share the same limit.
>
> Please let me know if that is the direction you want.

To be clear, this series is dropped. I will send the bytecode cap
as a new series.