syzbot


WARNING in bpf_check (2)

Status: fixed on 2018/12/07 08:24
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+4fc427c7af994b0948be@syzkaller.appspotmail.com
Fix commit: afd594240806 bpf: fix off-by-one error in adjust_subprog_starts
First crash: 2219d, last: 2219d
Discussions (3)
Title Replies (including bot) Last reply
[PATCH 4.19 000/142] 4.19.10-stable review 155 (155) 2018/12/17 14:12
[PATCH bpf] bpf: fix off-by-one error in adjust_subprog_starts 4 (4) 2018/11/17 05:15
WARNING in bpf_check (2) 1 (2) 2018/11/15 19:50
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in bpf_check bpf 3 2339d 2345d 8/28 fixed on 2018/08/07 13:43
upstream WARNING in bpf_check (3) C done done 1736 802d 1735d 22/28 fixed on 2023/02/24 13:50

Sample crash report:
audit: type=1400 audit(1542221670.986:36): avc:  denied  { map } for  pid=6270 comm="syz-executor244" path="/root/syz-executor244665442" dev="sda1" ino=16484 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
------------[ cut here ]------------
audit: type=1400 audit(1542221670.986:37): avc:  denied  { prog_load } for  pid=6270 comm="syz-executor244" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1
verifier bug. No program starts at insn 7
WARNING: CPU: 0 PID: 6270 at kernel/bpf/verifier.c:5880 jit_subprogs kernel/bpf/verifier.c:5879 [inline]
WARNING: CPU: 0 PID: 6270 at kernel/bpf/verifier.c:5880 fixup_call_args kernel/bpf/verifier.c:6023 [inline]
WARNING: CPU: 0 PID: 6270 at kernel/bpf/verifier.c:5880 bpf_check+0x5461/0x6310 kernel/bpf/verifier.c:6404
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 6270 Comm: syz-executor244 Not tainted 4.20.0-rc2+ #112
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+0x244/0x39d lib/dump_stack.c:113
 panic+0x2ad/0x55c kernel/panic.c:188
 __warn.cold.8+0x20/0x45 kernel/panic.c:540
 report_bug+0x254/0x2d0 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:178 [inline]
 do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:271
 do_invalid_op+0x36/0x40 arch/x86/kernel/traps.c:290
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:969
RIP: 0010:jit_subprogs kernel/bpf/verifier.c:5879 [inline]
RIP: 0010:fixup_call_args kernel/bpf/verifier.c:6023 [inline]
RIP: 0010:bpf_check+0x5461/0x6310 kernel/bpf/verifier.c:6404
Code: b6 14 02 4c 89 f0 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 69 0b 00 00 8b 73 04 48 c7 c7 c0 ca 30 88 44 01 ee e8 4f 14 b9 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:ffff8881c126f980 EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffffc90005e13040 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8165e7e5 RDI: 0000000000000005
RBP: ffff8881c126fb30 R08: ffff8881a322e0c0 R09: ffffed103b5c5020
R10: ffffed103b5c5020 R11: ffff8881dae28107 R12: 0000000000000000
R13: 0000000000000002 R14: ffffc90005e13044 R15: ffff8881c0da6380
 bpf_prog_load+0x113d/0x1cc0 kernel/bpf/syscall.c:1528
 __do_sys_bpf kernel/bpf/syscall.c:2504 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:2466 [inline]
 __x64_sys_bpf+0x36c/0x520 kernel/bpf/syscall.c:2466
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440159
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:00007fff04546138 EFLAGS: 00000207 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440159
RDX: 0000000000000048 RSI: 0000000020000000 RDI: 0000000000000005
RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000207 R12: 00000000004019e0
R13: 0000000000401a70 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/11/14 18:57 upstream ccda4af0f4b9 5f5f6d14 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2018/11/14 18:37 upstream ccda4af0f4b9 5f5f6d14 .config console log report syz C ci-upstream-kasan-gce-root
2018/11/14 18:20 upstream ccda4af0f4b9 5f5f6d14 .config console log report syz C ci-upstream-kasan-gce-smack-root
2018/11/14 19:00 net-old db8ddde766ad 5f5f6d14 .config console log report syz C ci-upstream-net-this-kasan-gce
2018/11/14 18:21 bpf da85d8bfd151 5f5f6d14 .config console log report syz C ci-upstream-bpf-kasan-gce
2018/11/14 18:27 net-next-old 15cef30974c5 5f5f6d14 .config console log report syz C ci-upstream-net-kasan-gce
2018/11/14 18:05 bpf-next 407be8d03e20 5f5f6d14 .config console log report syz C ci-upstream-bpf-next-kasan-gce
2018/11/14 18:19 linux-next 442b8cea2477 5f5f6d14 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/11/14 15:34 bpf-next 407be8d03e20 5f5f6d14 .config console log report ci-upstream-bpf-next-kasan-gce
* Struck through repros no longer work on HEAD.