lkml.org 
[lkml]   [2018]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: WARNING in pcpu_alloc
On Mon, Oct 1, 2018 at 6:14 PM syzbot
<syzbot+18628320d3b14a5c459c@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit: c5a9f9817ba5 Merge branch 'bpf-per-cpu-cgroup-local-storage'
> git tree: bpf-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=175f98e6400000
> kernel config: https://syzkaller.appspot.com/x/.config?x=443816db871edd66
> dashboard link: https://syzkaller.appspot.com/bug?extid=18628320d3b14a5c459c
> compiler: gcc (GCC) 8.0.1 20180413 (experimental)
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=129cbd1a400000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16685ac9400000
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+18628320d3b14a5c459c@syzkaller.appspotmail.com
>
> ------------[ cut here ]------------
> illegal size (0) or align (8) for percpu allocation

Roman,

looks like
if (attr->value_size > PAGE_SIZE)
return ERR_PTR(-E2BIG);
is not enough, since value_size==0 needs to be rejected as well.
Could you prepare a patch?

\
 
 \ /
  Last update: 2018-10-01 20:24    [W:0.027 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site