syzbot


WARNING in __mark_chain_precision (4)

Status: upstream: reported C repro on 2024/04/01 16:51
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+148110ee7cf72f39f33e@syzkaller.appspotmail.com
Fix commit: bpf: prevent r10 register from being marked as precise
Patched on: [ci-upstream-bpf-next-kasan-gce ci-upstream-linux-next-kasan-gce-root], missing on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-upstream-bpf-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-net-next-test-gce ci2-upstream-usb]
First crash: 20d, last: 20d
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 1678d 1696d 13/26 fixed on 2019/10/09 10:54
upstream WARNING in __mark_chain_precision (3) bpf C done 19 111d 132d 26/26 fixed on 2024/01/31 06:43
upstream WARNING in __mark_chain_precision C done 105 1712d 1748d 12/26 fixed on 2019/08/14 02:14

Sample crash report:
------------[ cut here ]------------
verifier backtracking bug
WARNING: CPU: 0 PID: 5066 at kernel/bpf/verifier.c:3714 backtrack_insn kernel/bpf/verifier.c:3714 [inline]
WARNING: CPU: 0 PID: 5066 at kernel/bpf/verifier.c:3714 __mark_chain_precision+0x7027/0x7520 kernel/bpf/verifier.c:4255
Modules linked in:
CPU: 0 PID: 5066 Comm: syz-executor296 Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #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 ed df b0 ff 90 0f 0b 90 90 e9 7d f2 ff ff e8 9e 0b ee ff c6 05 41 c2 c9 0d 01 90 48 c7 c7 c0 af b0 8b e8 ca df b0 ff 90 <0f> 0b 90 90 e9 5a f2 ff ff e8 7b 0b ee ff c6 05 1f c2 c9 0d 01 90
RSP: 0018:ffffc900043f6ac0 EFLAGS: 00010246
RAX: 3bf0d782b73e5400 RBX: ffff8880236c5600 RCX: ffff88802a9dbc00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900043f6d10 R08: ffffffff8157cb22 R09: 1ffff110172851a2
R10: dffffc0000000000 R11: ffffed10172851a3 R12: 0000000080000000
R13: 0000000000000010 R14: 0000000000000001 R15: ffff8880236c0000
FS:  000055557d2fe380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000082 CR3: 00000000231d4000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 mark_chain_precision kernel/bpf/verifier.c:4358 [inline]
 check_return_code+0xbe0/0x11e0 kernel/bpf/verifier.c:15500
 do_check+0xb91f/0x10500 kernel/bpf/verifier.c:17867
 do_check_common+0x14bd/0x1dd0 kernel/bpf/verifier.c:20492
 do_check_main kernel/bpf/verifier.c:20583 [inline]
 bpf_check+0x136ab/0x19010 kernel/bpf/verifier.c:21253
 bpf_prog_load+0x1667/0x20f0 kernel/bpf/syscall.c:2895
 __sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5631
 __do_sys_bpf kernel/bpf/syscall.c:5738 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5736 [inline]
 __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5736
 do_syscall_64+0xfb/0x240
 entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7f6484f2a469
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:00007ffc85bd0a08 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007ffc85bd0be8 RCX: 00007f6484f2a469
RDX: 0000000000000090 RSI: 0000000020000600 RDI: 0000000000000005
RBP: 00007f6484f9d610 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffc85bd0bd8 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.