lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM0EoMkLdOUQ3yrBuYsLdZvqniZ_r0VoACzOzKCo1VVzYeyPbw@mail.gmail.com>
Date:   Sun, 25 Sep 2022 13:08:16 -0400
From:   Jamal Hadi Salim <jhs@...atatu.com>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     syzbot <syzbot+a2c4601efc75848ba321@...kaller.appspotmail.com>,
        David Miller <davem@...emloft.net>,
        Jiri Pirko <jiri@...nulli.us>,
        Jakub Kicinski <kuba@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>, Paolo Abeni <pabeni@...hat.com>,
        syzkaller-bugs <syzkaller-bugs@...glegroups.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Kees Cook <keescook@...omium.org>
Subject: Re: [syzbot] WARNING in u32_change

Yes, after testing i realize there is nothing wrong here.
What warning was i supposed to see from running the reproducer?

We will still add the test will multiple keys later

cheers,
jamal

On Sun, Sep 25, 2022 at 12:29 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Sun, Sep 25, 2022 at 9:14 AM Jamal Hadi Salim <jhs@...atatu.com> wrote:
> >
> > On Sun, Sep 25, 2022 at 11:38 AM Jamal Hadi Salim <jhs@...atatu.com> wrote:
> > >
> > > Is there a way to tell the boat "looking into it?"
> >
> >
> > I guess I have to swim across to it to get the message;->
> >
> > I couldnt see the warning message  but it is obvious by inspection that
> > the memcpy is broken. We should add more test coverage.
> > This should fix it. Will send a formal patch later:
> >
> > diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
> > index 4d27300c2..591cbbf27 100644
> > --- a/net/sched/cls_u32.c
> > +++ b/net/sched/cls_u32.c
> > @@ -1019,7 +1019,7 @@ static int u32_change(struct net *net, struct
> > sk_buff *in_skb,
> >         }
> >
> >         s = nla_data(tb[TCA_U32_SEL]);
> > -       sel_size = struct_size(s, keys, s->nkeys);
> > +       sel_size = struct_size(s, keys, s->nkeys) + sizeof(n->sel);
> >         if (nla_len(tb[TCA_U32_SEL]) < sel_size) {
> >                 err = -EINVAL;
> >                 goto erridr;
>
> This patch is not needed, please look at struct_size() definition.
>
> Here, we might switch to unsafe_memcpy() instead of memcpy()

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ