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: <3f854ca9-f5d6-4065-c7b1-5e5b25ea742f@iogearbox.net>
Date:   Tue, 7 Dec 2021 10:19:53 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Björn Töpel <bjorn.topel@...il.com>,
        syzbot <syzbot+11421fbbff99b989670e@...kaller.appspotmail.com>
Cc:     Andrii Nakryiko <andrii@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>, bpf <bpf@...r.kernel.org>,
        David Miller <davem@...emloft.net>,
        Jesper Dangaard Brouer <hawk@...nel.org>,
        John Fastabend <john.fastabend@...il.com>,
        Jonathan Lemon <jonathan.lemon@...il.com>,
        Martin KaFai Lau <kafai@...com>,
        KP Singh <kpsingh@...nel.org>,
        Jakub Kicinski <kuba@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        "Karlsson, Magnus" <magnus.karlsson@...el.com>,
        Netdev <netdev@...r.kernel.org>,
        Song Liu <songliubraving@...com>,
        syzkaller-bugs@...glegroups.com, Yonghong Song <yhs@...com>,
        akpm@...ux-foundation.org
Subject: Re: [syzbot] WARNING: kmalloc bug in xdp_umem_create (2)

[ +Andrew ]

On 12/7/21 9:49 AM, Björn Töpel wrote:
> On Mon, 6 Dec 2021 at 11:55, syzbot
> <syzbot+11421fbbff99b989670e@...kaller.appspotmail.com> wrote:
>>
>> Hello,
>>
>> syzbot found the following issue on:
>>
>> HEAD commit:    a51e3ac43ddb Merge tag 'net-5.16-rc4' of git://git.kernel...
>> git tree:       net
>> console output: https://syzkaller.appspot.com/x/log.txt?x=17f04ebeb00000
>> kernel config:  https://syzkaller.appspot.com/x/.config?x=5b0eee8ab3ea1839
>> dashboard link: https://syzkaller.appspot.com/bug?extid=11421fbbff99b989670e
>> compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
>>
>> Unfortunately, I don't have any reproducer for this issue yet.
>>
>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>> Reported-by: syzbot+11421fbbff99b989670e@...kaller.appspotmail.com
>>
> 
> This warning stems from mm/utils.c:
>      /* Don't even allow crazy sizes */
>      if (WARN_ON_ONCE(size > INT_MAX))
>          return NULL;
> 
> The structure that is being allocated is the page-pinning accounting.
> AF_XDP has an internal limit of U32_MAX pages, which is *a lot*, but
> still fewer than what memcg allows (PAGE_COUNTER_MAX is a
> LONG_MAX/PAGE_SIZE on 64b systems).
> 
> The (imo hacky) workaround to silence the warning is to decrease the
> U32_MAX limit to something that is less than "sizeof householding
> struct".
> 
> Note that this is a warning, and not an oops/bug.
> 
> Thoughts?

This is coming from 7661809d493b ("mm: don't allow oversized kvmalloc() calls").
There was a recent discussion on this topic here [0]; this adds another instance.

Iff removal would not be an option, could we maybe add a __GFP_LARGE flag to tag
these instances that it is indeed intended that large allocs are allowed (and they
would thus bypass this warning)?

Thanks,
Daniel

   [0] https://lore.kernel.org/bpf/20211201202905.b9892171e3f5b9a60f9da251@linux-foundation.org/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ