[v5.15] WARNING in check_map_prog_compatibility

1 view
Skip to first unread message

syzbot

unread,
Mar 7, 2023, 3:33:14 PM3/7/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d9b4a0c83a2d Linux 5.15.98
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=154f3868c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=2f8d9515b973b23b
dashboard link: https://syzkaller.appspot.com/bug?extid=3d7af5d2cc62b29ab2ed
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/037cabbd3313/disk-d9b4a0c8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9967e551eb34/vmlinux-d9b4a0c8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a050c7a4fd99/bzImage-d9b4a0c8.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3d7af5...@syzkaller.appspotmail.com

------------[ cut here ]------------
trace type BPF program uses run-time allocation
WARNING: CPU: 1 PID: 9497 at kernel/bpf/verifier.c:11466 check_map_prog_compatibility+0x720/0x8c0 kernel/bpf/verifier.c:11466
Modules linked in:
CPU: 1 PID: 9497 Comm: syz-executor.4 Not tainted 5.15.98-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
RIP: 0010:check_map_prog_compatibility+0x720/0x8c0 kernel/bpf/verifier.c:11466
Code: ed e9 ec fc ff ff e8 0f ed ee ff 31 ed e9 e0 fc ff ff e8 03 ed ee ff c6 05 6f d9 3e 0c 01 48 c7 c7 a0 11 91 8a e8 b0 9a ba ff <0f> 0b e9 4a fb ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 4f f9 ff
RSP: 0018:ffffc90002e9f348 EFLAGS: 00010246
RAX: 15e3144bca731d00 RBX: 0000000000000011 RCX: 0000000000040000
RDX: ffffc9000bdc9000 RSI: 000000000000337b RDI: 000000000000337c
RBP: ffff88807b22b828 R08: ffffffff81668cfc R09: ffffed1017364f24
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffc90000d5e038
R13: ffff88807b22b800 R14: ffff88807bbc8000 R15: dffffc0000000000
FS: 00007fc861ec1700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f39b58031b8 CR3: 00000000228f9000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
resolve_pseudo_ldimm64+0x671/0x1240 kernel/bpf/verifier.c:11636
bpf_check+0x41a1/0x12940 kernel/bpf/verifier.c:13829
bpf_prog_load+0x12ae/0x1b50 kernel/bpf/syscall.c:2325
__sys_bpf+0x343/0x670 kernel/bpf/syscall.c:4614
__do_sys_bpf kernel/bpf/syscall.c:4718 [inline]
__se_sys_bpf kernel/bpf/syscall.c:4716 [inline]
__x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:4716
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fc86394f0f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc861ec1168 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007fc863a6ef80 RCX: 00007fc86394f0f9
RDX: 0000000000000080 RSI: 0000000020000300 RDI: 0000000000000005
RBP: 00007fc8639aaae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe8225fc4f R14: 00007fc861ec1300 R15: 0000000000022000
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Mar 7, 2023, 8:26:39 PM3/7/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: d9b4a0c83a2d Linux 5.15.98
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12fe4754c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=2f8d9515b973b23b
dashboard link: https://syzkaller.appspot.com/bug?extid=3d7af5d2cc62b29ab2ed
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=101f2b98c80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17e3e708c80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/037cabbd3313/disk-d9b4a0c8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9967e551eb34/vmlinux-d9b4a0c8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a050c7a4fd99/bzImage-d9b4a0c8.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3d7af5...@syzkaller.appspotmail.com

------------[ cut here ]------------
trace type BPF program uses run-time allocation
WARNING: CPU: 1 PID: 3592 at kernel/bpf/verifier.c:11466 check_map_prog_compatibility+0x720/0x8c0 kernel/bpf/verifier.c:11466
Modules linked in:
CPU: 0 PID: 3592 Comm: syz-executor259 Not tainted 5.15.98-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
RIP: 0010:check_map_prog_compatibility+0x720/0x8c0 kernel/bpf/verifier.c:11466
Code: ed e9 ec fc ff ff e8 0f ed ee ff 31 ed e9 e0 fc ff ff e8 03 ed ee ff c6 05 6f d9 3e 0c 01 48 c7 c7 a0 11 91 8a e8 b0 9a ba ff <0f> 0b e9 4a fb ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 4f f9 ff
RSP: 0018:ffffc90002fdf348 EFLAGS: 00010246
RAX: 679db187dd51a800 RBX: 0000000000000011 RCX: ffff88807ddb8000
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffff8881449a2828 R08: ffffffff81668cfc R09: ffffed10173667a0
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffc90000d1e038
R13: ffff8881449a2800 R14: ffff88807d208000 R15: dffffc0000000000
FS: 0000555557022300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555c86e90df0 CR3: 000000001b239000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
resolve_pseudo_ldimm64+0x671/0x1240 kernel/bpf/verifier.c:11636
bpf_check+0x41a1/0x12940 kernel/bpf/verifier.c:13829
bpf_prog_load+0x12ae/0x1b50 kernel/bpf/syscall.c:2325
__sys_bpf+0x343/0x670 kernel/bpf/syscall.c:4614
__do_sys_bpf kernel/bpf/syscall.c:4718 [inline]
__se_sys_bpf kernel/bpf/syscall.c:4716 [inline]
__x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:4716
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f7a9fb522f9
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:00007fff38cab8c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7a9fb522f9
RDX: 0000000000000080 RSI: 0000000020000300 RDI: 0000000000000005
RBP: 00007f7a9fb162e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000072 R11: 0000000000000246 R12: 00007f7a9fb16370
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>

syzbot

unread,
Aug 14, 2023, 4:54:27 AM8/14/23
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit 96da3f7d489d11b43e7c1af90d876b9a2492cca8
git tree: upstream
Author: Alexei Starovoitov <a...@kernel.org>
Date: Fri Sep 2 21:10:54 2022 +0000

bpf: Remove tracing program restriction on map types

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1725456fa80000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=169ca214c80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=114c3a24c80000


Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages