syzbot


WARNING in pcpu_alloc

Status: fixed on 2018/10/11 14:33
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+18628320d3b14a5c459c@syzkaller.appspotmail.com
Fix commit: b0584ea66d73 bpf: don't accept cgroup local storage with zero value size
First crash: 2027d, last: 2015d
Discussions (2)
Title Replies (including bot) Last reply
[PATCH bpf] bpf: don't accept cgroup local storage with zero value size 2 (2) 2018/10/02 12:43
WARNING in pcpu_alloc 2 (3) 2018/10/01 19:21
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 WARNING in pcpu_alloc C 1032 1623d 1832d 0/3 public: reported C repro on 2019/04/11 08:44

Sample crash report:
------------[ 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..

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/09/28 23:45 bpf-next c5a9f9817ba5 137d7c66 .config console log report syz C ci-upstream-bpf-next-kasan-gce
2018/09/29 00:28 linux-next 4794a36bf08d 137d7c66 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/10/10 04:35 bpf-next df3f94a0bbeb 8b311eaf .config console log report ci-upstream-bpf-next-kasan-gce
2018/09/28 21:00 bpf-next c5a9f9817ba5 137d7c66 .config console log report ci-upstream-bpf-next-kasan-gce
* Struck through repros no longer work on HEAD.