All of lore.kernel.org
 help / color / mirror / Atom feed
* WARNING in pcpu_alloc
@ 2018-10-01 18:14 syzbot
  2018-10-01 18:23 ` Alexei Starovoitov
  0 siblings, 1 reply; 4+ messages in thread
From: syzbot @ 2018-10-01 18:14 UTC (permalink / raw)
  To: ast, daniel, linux-kernel, netdev, syzkaller-bugs

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
WARNING: CPU: 0 PID: 5355 at mm/percpu.c:1382 pcpu_alloc+0x1359/0x15e0  
mm/percpu.c:1381
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 5355 Comm: syz-executor747 Not tainted 4.19.0-rc5+ #105
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
Google 01/01/2011
Call Trace:
  __dump_stack lib/dump_stack.c:77 [inline]
  dump_stack+0x1c4/0x2b4 lib/dump_stack.c:113
  panic+0x238/0x4e7 kernel/panic.c:184
  __warn.cold.8+0x163/0x1ba kernel/panic.c:536
  report_bug+0x254/0x2d0 lib/bug.c:186
  fixup_bug arch/x86/kernel/traps.c:178 [inline]
  do_error_trap+0x1fc/0x4d0 arch/x86/kernel/traps.c:296
  do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316
  invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:993
RIP: 0010:pcpu_alloc+0x1359/0x15e0 mm/percpu.c:1381
Code: ff e8 2b 9f ff ff e9 70 f4 ff ff e8 01 ee d0 ff 48 8b 95 c8 fd ff ff  
48 c7 c7 40 51 33 88 48 8b b5 e8 fd ff ff e8 87 d4 9a ff <0f> 0b 31 db e9  
29 ee ff ff e8 d9 ed d0 ff e8 04 f8 b9 ff 31 ff 41
RSP: 0018:ffff8801d8fef840 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff81650cb5 RDI: 0000000000000005
RBP: ffff8801d8fefab8 R08: ffff8801d8ec23c0 R09: ffffed003b584fe8
R10: ffffed003b584fe8 R11: ffff8801dac27f47 R12: 00000000006280c0
R13: ffffffffffffffff R14: 0000000000000008 R15: ffff8801bfc70034
  __alloc_percpu_gfp+0x27/0x30 mm/percpu.c:1545
  bpf_cgroup_storage_alloc+0x2d6/0x380 kernel/bpf/local_storage.c:393
  bpf_test_run+0xd1/0x780 net/bpf/test_run.c:37
  bpf_prog_test_run_skb+0x634/0xb40 net/bpf/test_run.c:155
  bpf_prog_test_run+0x130/0x1a0 kernel/bpf/syscall.c:1772
  __do_sys_bpf kernel/bpf/syscall.c:2409 [inline]
  __se_sys_bpf kernel/bpf/syscall.c:2353 [inline]
  __x64_sys_bpf+0x3d8/0x510 kernel/bpf/syscall.c:2353
  do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
  entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440379
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7  
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff  
ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffd94681f78 EFLAGS: 00000217 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440379
RDX: 0000000000000028 RSI: 0000000020000180 RDI: 000000000000000a
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401c00
R13: 0000000000401c90 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with  
syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: WARNING in pcpu_alloc
  2018-10-01 18:14 WARNING in pcpu_alloc syzbot
@ 2018-10-01 18:23 ` Alexei Starovoitov
  2018-10-01 19:21     ` Roman Gushchin
  0 siblings, 1 reply; 4+ messages in thread
From: Alexei Starovoitov @ 2018-10-01 18:23 UTC (permalink / raw)
  To: syzbot+18628320d3b14a5c459c, Roman Gushchin
  Cc: Alexei Starovoitov, Daniel Borkmann, LKML, Network Development,
	syzkaller-bugs

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: WARNING in pcpu_alloc
  2018-10-01 18:23 ` Alexei Starovoitov
@ 2018-10-01 19:21     ` Roman Gushchin
  0 siblings, 0 replies; 4+ messages in thread
From: Roman Gushchin @ 2018-10-01 19:21 UTC (permalink / raw)
  To: Alexei Starovoitov
  Cc: syzbot+18628320d3b14a5c459c, Alexei Starovoitov, Daniel Borkmann,
	LKML, Network Development, syzkaller-bugs

Sure, will do soon. Thanks!

Sent from my iPhone

> On Oct 1, 2018, at 20:24, Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
> 
> 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://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_log.txt-3Fx-3D175f98e6400000&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=1gv4CbD91yt2XHXTnOVUyGN15DqWWFz3xYlo9ioGZEw&e=
>> kernel config:  https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_.config-3Fx-3D443816db871edd66&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=EdREqNHdZup-52h5rZo0Mq59K3DYw1YVizBexkGikEk&e=
>> dashboard link: https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_bug-3Fextid-3D18628320d3b14a5c459c&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=QlmeF_tfsUIhzLLRKSwcR5ruQyqZA5wqow5kw_BRA6o&e=
>> compiler:       gcc (GCC) 8.0.1 20180413 (experimental)
>> syz repro:      https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_repro.syz-3Fx-3D129cbd1a400000&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=VDTRxfcVTxFp9LiiLsUYKevDzawNsYjRuqMHAZ7an2c&e=
>> C reproducer:   https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_repro.c-3Fx-3D16685ac9400000&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=PIFdU3kSa5SEp7k0bav9JxpLGyBiPz84uRE25vyl5_0&e=
>> 
>> 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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: WARNING in pcpu_alloc
@ 2018-10-01 19:21     ` Roman Gushchin
  0 siblings, 0 replies; 4+ messages in thread
From: Roman Gushchin @ 2018-10-01 19:21 UTC (permalink / raw)
  To: Alexei Starovoitov
  Cc: syzbot+18628320d3b14a5c459c, Alexei Starovoitov, Daniel Borkmann,
	LKML, Network Development, syzkaller-bugs

Sure, will do soon. Thanks!

Sent from my iPhone

> On Oct 1, 2018, at 20:24, Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
> 
> 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://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_log.txt-3Fx-3D175f98e6400000&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=1gv4CbD91yt2XHXTnOVUyGN15DqWWFz3xYlo9ioGZEw&e=
>> kernel config:  https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_.config-3Fx-3D443816db871edd66&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=EdREqNHdZup-52h5rZo0Mq59K3DYw1YVizBexkGikEk&e=
>> dashboard link: https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_bug-3Fextid-3D18628320d3b14a5c459c&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=QlmeF_tfsUIhzLLRKSwcR5ruQyqZA5wqow5kw_BRA6o&e=
>> compiler:       gcc (GCC) 8.0.1 20180413 (experimental)
>> syz repro:      https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_repro.syz-3Fx-3D129cbd1a400000&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=VDTRxfcVTxFp9LiiLsUYKevDzawNsYjRuqMHAZ7an2c&e=
>> C reproducer:   https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_repro.c-3Fx-3D16685ac9400000&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=PIFdU3kSa5SEp7k0bav9JxpLGyBiPz84uRE25vyl5_0&e=
>> 
>> 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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-01 19:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-01 18:14 WARNING in pcpu_alloc syzbot
2018-10-01 18:23 ` Alexei Starovoitov
2018-10-01 19:21   ` Roman Gushchin
2018-10-01 19:21     ` Roman Gushchin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.