general protection fault in btf_type_by_id

Status: upstream: reported C repro on 2026/10/21 06:47
Reported-by: syzbot+62230721b84d2c54dffc@syzkaller.appspotmail.com
First crash: 9h55m, last: 8h58m

Sample crash report:
R10: 0000000000000000 R11: 0000000000000246 R12: 00002000000000c0
R13: 0000000000000000 R14: 00007f91af0d9c00 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: 1 PID: 299 Comm: syz-executor216 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:ffffc90000b17c30 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8881085b5708 RCX: ffff888100dba800
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000b17c50 R08: ffff8881085b5757 R09: 1ffff110210b6aea
R10: dffffc0000000000 R11: ffffed10210b6aeb R12: dffffc0000000000
R13: 1ffff92000162f94 R14: 0000000000000000 R15: 0000000000000000
FS:  0000555591fa03c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002a251878 CR3: 0000000100d97000 CR4: 00000000003506a0
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:0x7f91af04da49
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:00007ffca6ac69e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007ffca6ac6a00 RCX: 00007f91af04da49
RDX: 0000000000000048 RSI: 0000200000000800 RDI: 0000000000000000
RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000009
R10: 0000000000000000 R11: 0000000000000246 R12: 00002000000000c0
R13: 0000000000000000 R14: 00007f91af0d9c00 R15: 0000000000000002
Modules linked in:
---[ end trace 8e9dec217e62ff1b ]---
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:ffffc90000b17c30 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8881085b5708 RCX: ffff888100dba800
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000b17c50 R08: ffff8881085b5757 R09: 1ffff110210b6aea
R10: dffffc0000000000 R11: ffffed10210b6aeb R12: dffffc0000000000
R13: 1ffff92000162f94 R14: 0000000000000000 R15: 0000000000000000
FS:  0000555591fa03c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00002000000000c0 CR3: 0000000100d97000 CR4: 00000000003506b0
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

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/21 07:15 android13-5.10-lts 30b93835619a 61c200c7 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-5-10-perf general protection fault in btf_type_by_id
2026/10/21 06:47 android13-5.10-lts 30b93835619a 61c200c7 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-5-10-perf general protection fault in btf_type_by_id
2026/10/21 06:18 android13-5.10-lts 30b93835619a 61c200c7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10-perf general protection fault in btf_type_by_id
* Struck through repros no longer work on HEAD.