Re: [syzbot] WARNING: kmalloc bug in xdp_umem_create (2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 6 Dec 2021 at 11:55, syzbot
<syzbot+11421fbbff99b989670e@xxxxxxxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxxxxxx
>

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?


Björn




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux