[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAG_fn=WrikVwpx_Z7DhqaPyw3OvQYmR49kH2H4+5fzAtmdtK_g@mail.gmail.com>
Date: Wed, 28 Sep 2022 13:15:35 +0200
From: Alexander Potapenko <glider@...gle.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: Martin KaFai Lau <martin.lau@...ux.dev>,
netdev <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
kernel-team <kernel-team@...com>,
Paolo Abeni <pabeni@...hat.com>,
Joanne Koong <joannelkoong@...il.com>,
Martin KaFai Lau <martin.lau@...nel.org>
Subject: Re: [PATCH net-next] net: Fix incorrect address comparison when
searching for a bind2 bucket
On Wed, Sep 28, 2022 at 7:07 AM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Tue, Sep 27, 2022 at 9:46 PM Martin KaFai Lau <martin.lau@...ux.dev> wrote:
> >
> > On 9/27/22 8:49 PM, Eric Dumazet wrote:
> > > On Mon, Sep 26, 2022 at 5:25 PM Martin KaFai Lau <kafai@...com> wrote:
> > >>
> > >> From: Martin KaFai Lau <martin.lau@...nel.org>
> > >>
> > >> The v6_rcv_saddr and rcv_saddr are inside a union in the
> > >> 'struct inet_bind2_bucket'. When searching a bucket by following the
> > >> bhash2 hashtable chain, eg. inet_bind2_bucket_match, it is only using
> > >> the sk->sk_family and there is no way to check if the inet_bind2_bucket
> > >> has a v6 or v4 address in the union. This leads to an uninit-value
> > >> KMSAN report in [0] and also potentially incorrect matches.
> > >
> > > I do not see the KMSAN report, is it missing from this changelog ?
> >
> > My bad. Forgot to paste the link in the commit message. It is here:
> >
> > https://lore.kernel.org/netdev/CAG_fn=Ud3zSW7AZWXc+asfMhZVL5ETnvuY44Pmyv4NPv-ijN-A@mail.gmail.com/
>
> I see, thanks.
>
> Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Tested-by: Alexander Potapenko <glider@...gle.com>
Thanks!
--
Alexander Potapenko
Software Engineer
Google Germany GmbH
Erika-Mann-Straße, 33
80636 München
Geschäftsführer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Powered by blists - more mailing lists