syzbot


general protection fault in bpf_prog_load

Status: auto-obsoleted due to no activity on 2023/04/13 14:58
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+d816006fc8166bf28540@syzkaller.appspotmail.com
First crash: 412d, last: 400d

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000004: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
CPU: 0 PID: 10626 Comm: syz-executor.3 Not tainted 6.2.0-rc7-next-20230208-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
RIP: 0010:bpf_prog_load+0x1bb1/0x21d0 kernel/bpf/syscall.c:2646
Code: 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 8f 05 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5c 24 38 48 8d 7b 24 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 45
RSP: 0018:ffffc90004eefb20 EFLAGS: 00010203
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc9000b212000
RDX: 0000000000000004 RSI: ffffffff81936807 RDI: 0000000000000024
RBP: ffffc90004eefcd8 R08: 0000000000000005 R09: 0000000000000000
R10: 00000000ffffffea R11: 0000000000000000 R12: ffffc90004a63000
R13: ffffc90004a63000 R14: ffffffff8a52ae00 R15: ffff88802a05a000
FS:  00007fb6195fe700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb6195fe718 CR3: 00000000298cc000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __sys_bpf+0x1435/0x5100 kernel/bpf/syscall.c:4966
 __do_sys_bpf kernel/bpf/syscall.c:5070 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5068 [inline]
 __x64_sys_bpf+0x79/0xc0 kernel/bpf/syscall.c:5068
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fb61aa8c0f9
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:00007fb6195fe168 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007fb61abac120 RCX: 00007fb61aa8c0f9
RDX: 0000000000000080 RSI: 0000000020000380 RDI: 0000000000000005
RBP: 00007fb61aae7ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffd1bc763f R14: 00007fb6195fe300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bpf_prog_load+0x1bb1/0x21d0 kernel/bpf/syscall.c:2646
Code: 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 8f 05 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5c 24 38 48 8d 7b 24 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 45
RSP: 0018:ffffc90004eefb20 EFLAGS: 00010203
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc9000b212000
RDX: 0000000000000004 RSI: ffffffff81936807 RDI: 0000000000000024
RBP: ffffc90004eefcd8 R08: 0000000000000005 R09: 0000000000000000
R10: 00000000ffffffea R11: 0000000000000000 R12: ffffc90004a63000
R13: ffffc90004a63000 R14: ffffffff8a52ae00 R15: ffff88802a05a000
FS:  00007fb6195fe700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0ef7c34000 CR3: 00000000298cc000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	89 fa                	mov    %edi,%edx
   2:	48 c1 ea 03          	shr    $0x3,%rdx
   6:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   a:	0f 85 8f 05 00 00    	jne    0x59f
  10:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  17:	fc ff df
  1a:	49 8b 5c 24 38       	mov    0x38(%r12),%rbx
  1f:	48 8d 7b 24          	lea    0x24(%rbx),%rdi
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	0f b6 14 02          	movzbl (%rdx,%rax,1),%edx <-- trapping instruction
  2e:	48 89 f8             	mov    %rdi,%rax
  31:	83 e0 07             	and    $0x7,%eax
  34:	83 c0 03             	add    $0x3,%eax
  37:	38 d0                	cmp    %dl,%al
  39:	7c 08                	jl     0x43
  3b:	84 d2                	test   %dl,%dl
  3d:	0f                   	.byte 0xf
  3e:	85                   	.byte 0x85
  3f:	45                   	rex.RB

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/12 14:58 linux-next 38d2b86a665b 93e26d60 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in bpf_prog_load
2023/01/31 05:45 linux-next 80bd9028feca 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in bpf_prog_load
* Struck through repros no longer work on HEAD.