syzbot


general protection fault in btf_is_module

Status: fixed on 2024/04/10 03:59
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+1336f3d4b10bcda75b89@syzkaller.appspotmail.com
Fix commit: e6be8cd5d3cf bpf: Fix error checks against bpf_get_btf_vmlinux().
First crash: 93d, last: 89d
Cause bisection: failed (error log, bisect log)
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH bpf-next v2] bpf: Fix error checks against bpf_get_btf_vmlinux(). 2 (2) 2024/01/26 05:10
[syzbot] [bpf?] general protection fault in btf_is_module 2 (3) 2024/01/25 18:05

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000001b: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000000d8-0x00000000000000df]
CPU: 0 PID: 5064 Comm: syz-executor334 Not tainted 6.7.0-syzkaller-12348-gd47b9f68d289 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:btf_is_module+0x26/0x80 kernel/bpf/btf.c:7441
Code: 00 eb f0 90 66 0f 1f 00 55 53 48 89 fb e8 92 24 de ff 48 8d bb d8 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 02 7e 48 0f b6 ab d8 00 00 00 31 ff 89 ee e8
RSP: 0018:ffffc900039ff828 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff81a07f47
RDX: 000000000000001b RSI: ffffffff81a9fcfe RDI: 00000000000000d8
RBP: ffffc900039ffaf0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000004 R11: ffffffff8aa0008b R12: ffffc90000ae6038
R13: ffffc90000ae6000 R14: 0000000000000000 R15: 0000000000000000
FS:  000055555660b380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001b6b398 CR3: 000000001aaae000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 check_struct_ops_btf_id kernel/bpf/verifier.c:20302 [inline]
 check_attach_btf_id kernel/bpf/verifier.c:20730 [inline]
 bpf_check+0x6cfe/0x9df0 kernel/bpf/verifier.c:20898
 bpf_prog_load+0x14dc/0x2310 kernel/bpf/syscall.c:2769
 __sys_bpf+0xbf7/0x4a00 kernel/bpf/syscall.c:5463
 __do_sys_bpf kernel/bpf/syscall.c:5567 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5565 [inline]
 __x64_sys_bpf+0x78/0xc0 kernel/bpf/syscall.c:5565
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f4dbbe514a9
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe76acbe18 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007ffe76acbff8 RCX: 00007f4dbbe514a9
RDX: 00000000000000a0 RSI: 00000000200009c0 RDI: 0000000000000005
RBP: 00007f4dbbec4610 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffe76acbfe8 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:btf_is_module+0x26/0x80 kernel/bpf/btf.c:7441
Code: 00 eb f0 90 66 0f 1f 00 55 53 48 89 fb e8 92 24 de ff 48 8d bb d8 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 02 7e 48 0f b6 ab d8 00 00 00 31 ff 89 ee e8
RSP: 0018:ffffc900039ff828 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff81a07f47
RDX: 000000000000001b RSI: ffffffff81a9fcfe RDI: 00000000000000d8
RBP: ffffc900039ffaf0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000004 R11: ffffffff8aa0008b R12: ffffc90000ae6038
R13: ffffc90000ae6000 R14: 0000000000000000 R15: 0000000000000000
FS:  000055555660b380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001b6b398 CR3: 000000001aaae000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	00 eb                	add    %ch,%bl
   2:	f0 90                	lock nop
   4:	66 0f 1f 00          	nopw   (%rax)
   8:	55                   	push   %rbp
   9:	53                   	push   %rbx
   a:	48 89 fb             	mov    %rdi,%rbx
   d:	e8 92 24 de ff       	call   0xffde24a4
  12:	48 8d bb d8 00 00 00 	lea    0xd8(%rbx),%rdi
  19:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  20:	fc ff df
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	0f b6 04 02          	movzbl (%rdx,%rax,1),%eax <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	74 02                	je     0x34
  32:	7e 48                	jle    0x7c
  34:	0f b6 ab d8 00 00 00 	movzbl 0xd8(%rbx),%ebp
  3b:	31 ff                	xor    %edi,%edi
  3d:	89 ee                	mov    %ebp,%esi
  3f:	e8                   	.byte 0xe8

Crashes (318):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/24 17:15 bpf-next d47b9f68d289 1e153dc8 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in btf_is_module
2024/01/26 16:36 bpf-next be4840b33eb2 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in btf_is_module
2024/01/26 14:36 bpf-next be4840b33eb2 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in btf_is_module
2024/01/26 14:05 bpf-next be4840b33eb2 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in btf_is_module
2024/01/26 12:16 bpf-next be4840b33eb2 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in btf_is_module
2024/01/26 09:59 bpf-next be4840b33eb2 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in btf_is_module
2024/01/26 08:33 bpf-next be4840b33eb2 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in btf_is_module
2024/01/26 07:29 bpf-next be4840b33eb2 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in btf_is_module
2024/01/26 04:13 bpf-next c8632acf193b cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in btf_is_module
2024/01/29 03:47 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/29 02:04 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 23:44 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 22:39 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 20:09 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 19:05 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 17:21 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 16:02 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 14:54 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 13:45 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 12:42 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 11:17 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 08:58 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 08:16 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 07:07 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 05:46 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 04:42 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 02:40 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/28 00:30 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 22:40 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 20:34 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 19:08 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 19:03 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 17:06 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 15:47 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 14:28 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 12:38 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 11:29 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 10:25 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 08:28 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 05:40 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 03:53 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 03:09 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/27 01:20 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/26 23:42 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/26 22:37 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/26 19:40 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/26 19:00 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/26 11:05 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/26 09:50 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/26 06:51 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
2024/01/26 05:39 linux-next 01af33cc9894 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in btf_is_module
* Struck through repros no longer work on HEAD.