[v6.1] WARNING in btf_type_id_size

0 views
Skip to first unread message

syzbot

unread,
May 20, 2023, 9:39:46 PM5/20/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: fa74641fb6b9 Linux 6.1.29
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=109e9f45280000
kernel config: https://syzkaller.appspot.com/x/.config?x=7454aa89ac475d7b
dashboard link: https://syzkaller.appspot.com/bug?extid=d5c448218035ab1c9d28
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13625819280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16322e41280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/53e4da6b145c/disk-fa74641f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/adeb1a2cfa86/vmlinux-fa74641f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c976f1155d08/Image-fa74641f.gz.xz

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

------------[ cut here ]------------
WARNING: CPU: 1 PID: 4216 at kernel/bpf/btf.c:1947 btf_type_id_size+0x8e0/0x948
Modules linked in:
CPU: 1 PID: 4216 Comm: syz-executor177 Not tainted 6.1.29-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : btf_type_id_size+0x8e0/0x948
lr : btf_type_id_size+0x8dc/0x948 kernel/bpf/btf.c:1946
sp : ffff80001d9679d0
x29: ffff80001d9679e0 x28: 1ffff00003b2cf50 x27: dfff800000000000
x26: 0000000011000000 x25: 0000000000000011 x24: 0000000000000000
x23: 0000000000000000 x22: ffff0000d626ee00 x21: 0000000000000001
x20: ffff80001d967a80 x19: 000000000e000000 x18: ffff80001d967640
x17: ffff8000085a5efc x16: 0000000000000000 x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000012 x12: ffff0000d6311bc0
x11: ff808000086643c0 x10: 0000000000000000 x9 : ffff8000086643c0
x8 : ffff0000d6311bc0 x7 : 0000000000000000 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000005
x2 : ffff80001d967aa0 x1 : 0000000011000000 x0 : 000000000e000000
Call trace:
btf_type_id_size+0x8e0/0x948
map_check_btf+0x104/0x97c kernel/bpf/syscall.c:996
map_create+0x6f4/0xbc8 kernel/bpf/syscall.c:1145
__sys_bpf+0x284/0x654 kernel/bpf/syscall.c:4945
__do_sys_bpf kernel/bpf/syscall.c:5067 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5065 [inline]
__arm64_sys_bpf+0x80/0x98 kernel/bpf/syscall.c:5065
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
irq event stamp: 15188
hardirqs last enabled at (15187): [<ffff800008648a60>] pcpu_freelist_pop+0xa0/0x144 kernel/bpf/percpu_freelist.c:198
hardirqs last disabled at (15188): [<ffff8000120e850c>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405
softirqs last enabled at (15138): [<ffff8000086699e4>] spin_unlock_bh include/linux/spinlock.h:395 [inline]
softirqs last enabled at (15138): [<ffff8000086699e4>] btf_alloc_id+0x98/0x1ac kernel/bpf/btf.c:1589
softirqs last disabled at (15134): [<ffff800008669984>] spin_lock_bh include/linux/spinlock.h:355 [inline]
softirqs last disabled at (15134): [<ffff800008669984>] btf_alloc_id+0x38/0x1ac kernel/bpf/btf.c:1585
---[ end trace 0000000000000000 ]---


---
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.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Oct 17, 2023, 8:47:34 PM10/17/23
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit e6c2f594ed961273479505b42040782820190305
git tree: upstream
Author: Yonghong Song <y...@fb.com>
Date: Tue May 30 20:50:29 2023 +0000

bpf: Silence a warning in btf_type_id_size()

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=158c7a91680000
kernel config: https://syzkaller.appspot.com/x/.config?x=51bbb1424030ff42
dashboard link: https://syzkaller.appspot.com/bug?extid=d5c448218035ab1c9d28
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1076d9f9680000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10b96de5680000


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