[Android 5.10] general protection fault in btf_type_by_id

0 views
Skip to first unread message

syzbot

unread,
2:47 AM (18 hours ago) 2:47 AM
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 30b93835619a Merge 3f7778b7513c ("xfrm: propagate extack t..
git tree: android13-5.10-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=13085481580000
kernel config: https://syzkaller.appspot.com/x/.config?x=40fa24cc6888ca30
dashboard link: https://syzkaller.appspot.com/bug?extid=62230721b84d2c54dffc
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=102bb831580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12cbeb71580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/20c20b1a9a6d/disk-30b93835.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/aed922b92f3c/vmlinux-30b93835.xz
kernel image: https://storage.googleapis.com/syzbot-assets/cb35a02e83cc/bzImage-30b93835.xz

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

RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000009
R10: 0000000000000000 R11: 0000000000000246 R12: 00002000000000c0
R13: 0000000000000000 R14: 00007f218daecc00 R15: 0000000000000002
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 PID: 299 Comm: syz-executor183 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
RIP: 0010:btf_type_by_id+0x80/0xc0 kernel/bpf/btf.c:672
Code: 83 c3 08 48 89 d8 48 c1 e8 03 42 80 3c 20 00 74 08 48 89 df e8 71 77 22 00 45 89 f6 49 c1 e6 03 4c 03 33 4c 89 f0 48 c1 e8 03 <42> 80 3c 20 00 74 08 4c 89 f7 e8 51 77 22 00 49 8b 06 5b 41 5c 41
RSP: 0018:ffffc90000b27c30 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8881087a2f08 RCX: ffff88810ab5bc00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000b27c50 R08: ffff8881087a2f57 R09: 1ffff110210f45ea
R10: dffffc0000000000 R11: ffffed10210f45eb R12: dffffc0000000000
R13: 1ffff92000164f94 R14: 0000000000000000 R15: 0000000000000000
FS: 0000555576d843c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00002000000000c0 CR3: 000000011f577000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
map_check_btf+0x14c/0x580 kernel/bpf/syscall.c:775
map_create+0x14f7/0x1f50 kernel/bpf/syscall.c:874
__do_sys_bpf kernel/bpf/syscall.c:4417 [inline]
__se_sys_bpf+0x24b/0x740 kernel/bpf/syscall.c:4391
__x64_sys_bpf+0x7b/0x90 kernel/bpf/syscall.c:4391
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f218da60a49
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 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 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd8eb49c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007ffd8eb49c70 RCX: 00007f218da60a49
RDX: 0000000000000048 RSI: 0000200000000800 RDI: 0000000000000000
RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000009
R10: 0000000000000000 R11: 0000000000000246 R12: 00002000000000c0
R13: 0000000000000000 R14: 00007f218daecc00 R15: 0000000000000002
Modules linked in:
---[ end trace c733aab45763f5b4 ]---
RIP: 0010:btf_type_by_id+0x80/0xc0 kernel/bpf/btf.c:672
Code: 83 c3 08 48 89 d8 48 c1 e8 03 42 80 3c 20 00 74 08 48 89 df e8 71 77 22 00 45 89 f6 49 c1 e6 03 4c 03 33 4c 89 f0 48 c1 e8 03 <42> 80 3c 20 00 74 08 4c 89 f7 e8 51 77 22 00 49 8b 06 5b 41 5c 41
RSP: 0018:ffffc90000b27c30 EFLAGS: 00010246

RAX: 0000000000000000 RBX: ffff8881087a2f08 RCX: ffff88810ab5bc00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000b27c50 R08: ffff8881087a2f57 R09: 1ffff110210f45ea
R10: dffffc0000000000 R11: ffffed10210f45eb R12: dffffc0000000000
R13: 1ffff92000164f94 R14: 0000000000000000 R15: 0000000000000000
FS: 0000555576d843c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f218dac105c CR3: 000000011f577000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 83 c3 08 add $0x8,%ebx
3: 48 89 d8 mov %rbx,%rax
6: 48 c1 e8 03 shr $0x3,%rax
a: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1)
f: 74 08 je 0x19
11: 48 89 df mov %rbx,%rdi
14: e8 71 77 22 00 call 0x22778a
19: 45 89 f6 mov %r14d,%r14d
1c: 49 c1 e6 03 shl $0x3,%r14
20: 4c 03 33 add (%rbx),%r14
23: 4c 89 f0 mov %r14,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) <-- trapping instruction
2f: 74 08 je 0x39
31: 4c 89 f7 mov %r14,%rdi
34: e8 51 77 22 00 call 0x22778a
39: 49 8b 06 mov (%r14),%rax
3c: 5b pop %rbx
3d: 41 5c pop %r12
3f: 41 rex.B


---
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 report is already addressed, 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 overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

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

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages