syzbot


WARNING in check_map_prog_compatibility

Status: fixed on 2023/02/24 13:50
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+e3f8d4df1e1981a97abb@syzkaller.appspotmail.com
Fix commit: 34dd3bad1a6f bpf: Relax the requirement to use preallocated hash maps in tracing progs.
First crash: 932d, last: 765d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: WARNING in bpf_check (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit 34dd3bad1a6f1dc7d18ee8dd53f1d31bffd2aee8
Author: Alexei Starovoitov <ast@kernel.org>
Date: Fri Sep 2 21:10:47 2022 +0000

  bpf: Relax the requirement to use preallocated hash maps in tracing progs.

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] WARNING in check_map_prog_compatibility 2 (5) 2023/02/03 05:07
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 WARNING in check_map_prog_compatibility origin:lts-only C done 8186 19h44m 603d 0/3 upstream: reported C repro on 2023/03/07 20:33

Sample crash report:
------------[ cut here ]------------
trace type BPF program uses run-time allocation
WARNING: CPU: 1 PID: 3610 at kernel/bpf/verifier.c:12517 check_map_prog_compatibility+0x76b/0x920 kernel/bpf/verifier.c:12517
Modules linked in:
CPU: 1 PID: 3610 Comm: syz-executor342 Not tainted 5.19.0-syzkaller-02972-g200e340f2196 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
RIP: 0010:check_map_prog_compatibility+0x76b/0x920 kernel/bpf/verifier.c:12517
Code: c7 fc ff ff e8 06 1a ee ff 31 db e9 bb fc ff ff e8 fa 19 ee ff c6 05 fc 31 56 0c 01 48 c7 c7 c0 a4 94 8a 31 c0 e8 b5 4d b6 ff <0f> 0b e9 23 fb ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c c0 f8 ff
RSP: 0018:ffffc9000308f1e8 EFLAGS: 00010246
RAX: e7486afe99925d00 RBX: 0000000000000001 RCX: ffff888027919d80
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffff88814ac49030 R08: ffffffff816c1ccd R09: ffffed1017364f14
R10: ffffed1017364f14 R11: 1ffff11017364f13 R12: ffff88814ac49000
R13: dffffc0000000000 R14: ffff8880220bc000 R15: 0000000000000011
FS:  0000555555adf300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000563404cbb6f8 CR3: 0000000073ff5000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 resolve_pseudo_ldimm64+0x67f/0x1270 kernel/bpf/verifier.c:12690
 bpf_check+0x2606/0x13b70 kernel/bpf/verifier.c:14988
 bpf_prog_load+0x1288/0x1b80 kernel/bpf/syscall.c:2575
 __sys_bpf+0x3d3/0x6c0 kernel/bpf/syscall.c:4917
 __do_sys_bpf kernel/bpf/syscall.c:5021 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5019 [inline]
 __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5019
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f1f412add59
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffefadb0998 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f1f412add59
RDX: 0000000000000080 RSI: 00000000200004c0 RDI: 0000000000000005
RBP: 00007f1f41271f00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000072 R11: 0000000000000246 R12: 00007f1f41271f90
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Crashes (128):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/08/07 10:38 upstream 200e340f2196 88e3a122 .config strace log report syz C ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/07 01:51 upstream 200e340f2196 88e3a122 .config strace log report syz C ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/09 17:09 upstream e5524c2a1fc4 b5765a15 .config strace log report syz C ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/04/12 04:16 upstream ce522ba9ef7e af01ee7d .config console log report syz C ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/11 00:54 upstream 200e340f2196 a6201f11 .config strace log report syz C ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/09/25 21:50 upstream 105a36f3694e 0042f2b4 .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/09/20 13:40 upstream 521a547ced64 7c41a9ba .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/09/17 00:35 upstream 6879c2d3b960 dd9a85ff .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/09/13 04:42 upstream 6504d82f4440 f371ed7e .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/09/11 14:52 upstream b96fbd602d35 356d8217 .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/09/02 18:46 upstream 42e66b1cc3a0 25194605 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/31 16:07 upstream dcf8e5633e2e 51e54e30 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/31 04:31 upstream dcf8e5633e2e 4a380809 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/30 20:21 upstream dcf8e5633e2e 4a380809 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/28 08:12 upstream 10d4879f9ef0 07177916 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/26 23:21 upstream 3e5c673f0d75 e5a303f1 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/25 10:11 upstream c40e8341e3b3 514514f6 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/20 16:35 upstream 50cd95ac4654 26a13b38 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/20 08:50 upstream 4c2d0b039c5c 26a13b38 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/19 03:52 upstream 3b06a2755758 26a13b38 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/14 15:37 upstream 7ebfc85e2cd7 8dfcaa3d .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/14 10:47 upstream 7ebfc85e2cd7 8dfcaa3d .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/11 18:26 upstream 200e340f2196 787ed7e0 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/08/11 17:25 upstream 200e340f2196 787ed7e0 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/29 19:50 upstream 6e2c0490769e fef302b1 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/27 15:36 upstream 39c3c396f813 da9d0366 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/22 07:33 upstream 68e77ffbfd06 5e6028b9 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/22 03:59 upstream 68e77ffbfd06 5e6028b9 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/20 13:09 upstream ca85855bdcae 775344bc .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/16 06:36 upstream 9b59ec8d50a1 95cb00d1 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/15 16:24 upstream e5d523f1ae8f 5d921b08 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/14 08:04 upstream 4a57a8400075 5d921b08 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/10 04:38 upstream b1c428b6c368 b5765a15 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/07 07:42 upstream 9f09069cde34 bff65f44 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/07 00:26 upstream 9f09069cde34 bff65f44 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/06 06:03 upstream e35e5b6f695d bff65f44 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/05 11:04 upstream c1084b6c5620 bff65f44 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/07/02 21:20 upstream 089866061428 1434eec0 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/06/30 12:25 upstream d9b2ba67917c 1434eec0 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/06/28 00:04 upstream 941e3e791269 ef82eb2c .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/06/23 08:17 upstream 3abc3ae553c7 912f5df7 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/06/23 03:50 upstream 3abc3ae553c7 912f5df7 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/06/21 18:28 upstream 78ca55889a54 0fc5c330 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/06/19 03:06 upstream 4b35035bcf80 8f633d84 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/06/19 02:36 upstream 4b35035bcf80 8f633d84 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/06/17 16:05 upstream 47700948a4ab cb58b3b2 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/06/15 16:52 upstream 018ab4fabddd 1719ee24 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/06/11 18:08 upstream 0885eacdc81f 0d5abf15 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/06/09 03:49 upstream 9886142c7a22 b2706118 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/06/08 13:01 upstream e71e60cd74df b2706118 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/06/05 23:15 upstream 44688ffd111a c8857892 .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
2022/04/12 04:05 upstream ce522ba9ef7e af01ee7d .config console log report info ci-upstream-kasan-gce-smack-root WARNING in check_map_prog_compatibility
* Struck through repros no longer work on HEAD.