syzbot


WARNING in __mark_chain_precision (4)

Status: fixed on 2024/06/05 13:52
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+148110ee7cf72f39f33e@syzkaller.appspotmail.com
Fix commit: 1f2a74b41ea8 bpf: prevent r10 register from being marked as precise
First crash: 246d, last: 225d
Discussions (3)
Title Replies (including bot) Last reply
[PATCH v2 bpf-next 1/2] bpf: prevent r10 register from being marked as precise 5 (5) 2024/04/05 01:40
[PATCH bpf-next 1/2] bpf: prevent r10 register from being marked as precise 6 (6) 2024/04/04 20:13
[syzbot] [bpf?] WARNING in __mark_chain_precision (4) 0 (1) 2024/04/01 16:51
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in __mark_chain_precision (2) bpf C done 18 1904d 1922d 13/28 fixed on 2019/10/09 10:54
upstream WARNING in __mark_chain_precision (3) bpf C done 19 337d 358d 25/28 fixed on 2024/01/31 06:43
upstream WARNING in __mark_chain_precision C done 105 1938d 1974d 12/28 fixed on 2019/08/14 02:14

Sample crash report:
------------[ cut here ]------------
verifier backtracking bug
WARNING: CPU: 0 PID: 5083 at kernel/bpf/verifier.c:3714 backtrack_insn kernel/bpf/verifier.c:3714 [inline]
WARNING: CPU: 0 PID: 5083 at kernel/bpf/verifier.c:3714 __mark_chain_precision+0x7027/0x7520 kernel/bpf/verifier.c:4255
Modules linked in:
CPU: 0 PID: 5083 Comm: syz-executor409 Not tainted 6.9.0-rc4-syzkaller-00266-g977b1ef51866 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:backtrack_insn kernel/bpf/verifier.c:3714 [inline]
RIP: 0010:__mark_chain_precision+0x7027/0x7520 kernel/bpf/verifier.c:4255
Code: 8b e8 dd 4f b0 ff 90 0f 0b 90 90 e9 7d f2 ff ff e8 4e d3 ed ff c6 05 87 47 eb 0d 01 90 48 c7 c7 80 b5 d0 8b e8 ba 4f b0 ff 90 <0f> 0b 90 90 e9 5a f2 ff ff e8 2b d3 ed ff c6 05 65 47 eb 0d 01 90
RSP: 0018:ffffc9000507eac0 EFLAGS: 00010246
RAX: 37f6af13075a5300 RBX: ffff88802216d600 RCX: ffff888021ca8000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000507ed10 R08: ffffffff81588072 R09: 1ffff1101728519a
R10: dffffc0000000000 R11: ffffed101728519b R12: 0000000080000000
R13: 0000000000000010 R14: 0000000000000001 R15: ffff888022168000
FS:  0000555560129380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000001b4ce388 CR3: 000000005259c000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 mark_chain_precision kernel/bpf/verifier.c:4358 [inline]
 check_return_code+0xbe0/0x11e0 kernel/bpf/verifier.c:15520
 do_check+0xb962/0x10740 kernel/bpf/verifier.c:17887
 do_check_common+0x14bd/0x1dd0 kernel/bpf/verifier.c:20516
 do_check_main kernel/bpf/verifier.c:20607 [inline]
 bpf_check+0x126eb/0x18fe0 kernel/bpf/verifier.c:21277
 bpf_prog_load+0x1667/0x20f0 kernel/bpf/syscall.c:2895
 __sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5660
 __do_sys_bpf kernel/bpf/syscall.c:5767 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5765 [inline]
 __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5765
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5a12f0a469
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffffa98b498 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007ffffa98b678 RCX: 00007f5a12f0a469
RDX: 0000000000000090 RSI: 0000000020000600 RDI: 0000000000000005
RBP: 00007f5a12f7d610 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffffa98b668 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/21 12:22 upstream 977b1ef51866 af24b050 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in __mark_chain_precision
2024/04/21 12:02 upstream 977b1ef51866 af24b050 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in __mark_chain_precision
2024/03/31 15:18 upstream fe46a7dd189e 6baf5069 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in __mark_chain_precision
2024/04/01 04:21 net f99c5f563c17 6baf5069 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in __mark_chain_precision
2024/03/31 16:05 bpf 443574b03387 6baf5069 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in __mark_chain_precision
2024/03/31 16:30 bpf-next 14bb1e8c8d4a 6baf5069 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in __mark_chain_precision
2024/03/31 18:42 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 707081b61156 6baf5069 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in __mark_chain_precision
2024/03/31 15:00 upstream fe46a7dd189e 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in __mark_chain_precision
* Struck through repros no longer work on HEAD.