syzbot


WARNING in bpf_check

Status: fixed on 2018/08/07 13:43
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+7d427828b2ea6e592804@syzkaller.appspotmail.com
Fix commit: c7a897843224 bpf: don't leave partial mangled prog in jit_subprogs error path
First crash: 2114d, last: 2107d
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 4.17 000/101] 4.17.9-stable review 100 (101) 2018/07/22 11:42
WARNING in bpf_check 3 (4) 2018/07/12 21:15
[PATCH bpf v2] bpf: don't leave partial mangled prog in jit_subprogs error path 2 (2) 2018/07/12 21:05
[PATCH bpf] bpf: don't leave partially mangled prog in jit_subprogs error path 1 (1) 2018/07/12 15:19
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in bpf_check (2) bpf C 9 1988d 1988d 11/26 fixed on 2018/12/07 08:24
upstream WARNING in bpf_check (3) C done done 1736 571d 1504d 22/26 fixed on 2023/02/24 13:50

Sample crash report:
RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000013
R13: 00000000004bb7f3 R14: 00000000004c8c08 R15: 000000000000003b
------------[ cut here ]------------
verifier bug. No program starts at insn 3
WARNING: CPU: 0 PID: 2863 at kernel/bpf/verifier.c:1613 get_callee_stack_depth kernel/bpf/verifier.c:1612 [inline]
WARNING: CPU: 0 PID: 2863 at kernel/bpf/verifier.c:1613 fixup_call_args kernel/bpf/verifier.c:5587 [inline]
WARNING: CPU: 0 PID: 2863 at kernel/bpf/verifier.c:1613 bpf_check+0x5239/0x5e60 kernel/bpf/verifier.c:5952
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 2863 Comm: syz-executor5 Not tainted 4.18.0-rc3+ #58
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+0x1c9/0x2b4 lib/dump_stack.c:113
 panic+0x238/0x4e7 kernel/panic.c:184
 __warn.cold.8+0x163/0x1ba kernel/panic.c:536
 report_bug+0x252/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:992
RIP: 0010:get_callee_stack_depth kernel/bpf/verifier.c:1612 [inline]
RIP: 0010:fixup_call_args kernel/bpf/verifier.c:5587 [inline]
RIP: 0010:bpf_check+0x5239/0x5e60 kernel/bpf/verifier.c:5952
Code: ff 48 89 df e8 c8 58 2e 00 e9 d8 d7 ff ff e8 6e 2f f0 ff 8b 74 24 58 48 c7 c7 20 8d ef 87 c6 05 f2 fe 0d 08 01 e8 37 52 bb ff <0f> 0b 48 8b 54 24 08 b8 ff ff 37 00 48 c1 e0 2a 48 c1 ea 03 0f b6 
RSP: 0018:ffff8801ad8bf980 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffc90007045000
RDX: 0000000000040000 RSI: ffffffff81631851 RDI: ffff8801ad8bf658
RBP: ffff8801ad8bfb30 R08: ffff8801c1b66600 R09: fffffbfff11f1220
R10: fffffbfff11f1220 R11: ffffffff88f89103 R12: dffffc0000000000
R13: ffffc90001a70040 R14: 00000000fffffffe R15: ffff88019b292940
 bpf_prog_load+0x1141/0x1c90 kernel/bpf/syscall.c:1352
 __do_sys_bpf kernel/bpf/syscall.c:2305 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:2267 [inline]
 __x64_sys_bpf+0x36c/0x510 kernel/bpf/syscall.c:2267
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x455ab9
Code: 1d ba fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 eb b9 fb ff c3 66 2e 0f 1f 84 00 00 00 00 
RSP: 002b:00007f8952c98c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f8952c996d4 RCX: 0000000000455ab9
RDX: 0000000000000048 RSI: 0000000020000000 RDI: 0000000000000005
RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000013
R13: 00000000004bb7f3 R14: 00000000004c8c08 R15: 000000000000003b
Dumping ftrace buffer:
---------------------------------
syz-exec-18313   0...3 167324945us : 0: }D
---------------------------------
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/07/18 13:50 bpf-next 8ae71e76cf1f 809256c3 .config console log report ci-upstream-bpf-next-kasan-gce
2018/07/12 19:54 bpf-next 671dffa7de7b 06c33b3a .config console log report ci-upstream-bpf-next-kasan-gce
2018/07/11 21:02 bpf-next 671dffa7de7b 2e0e3130 .config console log report ci-upstream-bpf-next-kasan-gce
* Struck through repros no longer work on HEAD.