[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aGMLcnzpapXQFbA+@pop-os.localdomain>
Date: Mon, 30 Jun 2025 15:10:58 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Victor Nogueira <victor@...atatu.com>
Cc: Jamal Hadi Salim <jhs@...atatu.com>, Mingi Cho <mgcho.minic@...il.com>,
security@...nel.org, Jiri Pirko <jiri@...nulli.us>,
Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: Use-after-free in Linux tc subsystem (v6.15)
On Mon, Jun 30, 2025 at 08:52:22AM -0300, Victor Nogueira wrote:
> On 6/30/25 08:06, Jamal Hadi Salim wrote:
> > On Sun, Jun 29, 2025 at 5:08 PM Cong Wang <xiyou.wangcong@...il.com> wrote:
> > >
> > > On Sat, Jun 28, 2025 at 05:26:59PM -0400, Jamal Hadi Salim wrote:
> > > > On Thu, Jun 26, 2025 at 1:11 AM Mingi Cho <mgcho.minic@...il.com> wrote:
> > > > > Hello,
> > > > >
> > > > > I think the testcase I reported earlier actually contains two
> > > > > different bugs. The first is returning SUCCESS with an empty TBF qdisc
> > > > > in tbf_segment, and the second is returning SUCCESS with an empty QFQ
> > > > > qdisc in qfq_enqueue.
> > > > >
> > > >
> > > > Please join the list where a more general solution is being discussed here:
> > > > https://lore.kernel.org/netdev/aF847kk6H+kr5kIV@pop-os.localdomain/
> > >
> > > I think that one is different, the one here is related to GSO, the above
> > > linked one is not. Let me think about the GSO issue, since I already
> > > looked into it before.
> >
> > TBH, they all look the same to me - at minimal, they should be tested
> > against Lion's patch first. Maybe there's a GSO corner case but wasnt
> > clear to me.
>
> I did a quick test of Lion's patch using Mingi's C reproducer.
> The patch seems to fix the UAF.
Good finding! I think Mingi's reproducer still exploits the
->qlen_notify() refcnt to expose issues, but the GSO segmentation itself
is also problematic even without ->qlen_notify(), IMHO.
I have an elegant solution to move the skb_gso_segment() to the upper
layer so that child Qdisc's don't need to handle GSO segmentation any
more. It fixes the UAF too, without Lion's patch.
I will wait for Mingi's response to see if I should submit it for -net
as a bug fix, or -net-next as code refactoring.
Thanks!
Powered by blists - more mailing lists