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] [day] [month] [year] [list]
Message-ID: <CAABMjtEnPa2PWPJ0SsGVLZjGqO8V=0ajsY9A1ZAdNpmEW5sjTw@mail.gmail.com>
Date:   Thu, 14 Jul 2022 00:25:52 +0600
From:   Khalid Masum <khalid.masum.92@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     linux-kernel-mentees@...ts.linuxfoundation.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Shuah Khan <skhan@...uxfoundation.org>,
        Pavel Skripkin <paskripkin@...il.com>,
        Marc Kleine-Budde <mkl@...gutronix.de>,
        Stefano Garzarella <sgarzare@...hat.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Nikolay Aleksandrov <nikolay@...dia.com>,
        syzbot+1fa91bcd05206ff8cbb5@...kaller.appspotmail.com
Subject: Re: [RFC PATCH 1/1] net: kcm: Use sk_psock size for kcm_psock_cache

On Thu, Jul 14, 2022 at 12:16 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Wed, 13 Jul 2022 12:32:04 +0600 Khalid Masum wrote:
> > `struct sock` has a member `sk_user_data`, which got its memory allocated
> > in `kcm_attach` by `kcm_psock_cache` with the size of `kcm_psock`. Which
> > is not enough when the member is used as `sk_psock` causing out of bound
> > read.
> >
> > Use `sk_psock` size to allocate memory instead for `sk_user_data`.
> >
> > Reported-by: syzbot+1fa91bcd05206ff8cbb5@...kaller.appspotmail.com
> > Signed-off-by: Khalid Masum <khalid.masum.92@...il.com>
>
> Odd CC list, it looks like a netdev problem but netdev@ is not copied.

I am sorry for the inconvenience. I resent the patch with netdev in CC here:
https://lore.kernel.org/netdev/20220713181324.14228-2-khalid.masum.92@gmail.com/

> We had an other parson looking at this on netdev. Is this happening
> when legit kernel socket gets mixed with BPF sockmap?
>
> Does this fix work?
I will take a look at it.
> https://lore.kernel.org/netdev/165030056960.5073.6664402939918720250.stgit@oracle-102.nfsv4.dev/

Thanks,
Khalid Masum

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ