syzbot


general protection fault in drain_mem_cache

Status: moderation: reported on 2024/05/25 11:48
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+1545ca5c4f925cfda99e@syzkaller.appspotmail.com
First crash: 25d, last: 25d

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
CPU: 1 PID: 45 Comm: kworker/u32:2 Not tainted 6.9.0-syzkaller-10323-g8f6a15f095a6 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: events_unbound bpf_map_free_deferred
RIP: 0010:free_all kernel/bpf/memalloc.c:272 [inline]
RIP: 0010:drain_mem_cache+0x433/0x610 kernel/bpf/memalloc.c:647
Code: 75 1c eb 78 e8 8e ba da ff 48 89 ef e8 e6 9f 2d 00 e8 81 ba da ff 4d 85 ed 74 61 4c 89 ed e8 74 ba da ff 48 89 e8 48 c1 e8 03 <42> 80 3c 30 00 0f 85 08 01 00 00 31 ff 89 de 4c 8b 6d 00 e8 55 b5
RSP: 0018:ffffc900006bfb58 EFLAGS: 00010207
RAX: 0000000000000005 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888018cfa440 RSI: ffffffff81b3ca2c RDI: ffffe8ffad3590f0
RBP: 000000000000002d R08: 0000000000000000 R09: ffffed10058289a0
R10: ffff88802c144d03 R11: 0000000000000002 R12: ffffe8ffad359050
R13: 0000000000000000 R14: dffffc0000000000 R15: ffffe8ffad2590e8
FS:  0000000000000000(0000) GS:ffff88802c100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c000e718e8 CR3: 000000002b91c000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bpf_mem_alloc_destroy+0x14b/0x9d0 kernel/bpf/memalloc.c:758
 htab_map_free+0x38c/0xb40 kernel/bpf/hashtab.c:1564
 bpf_map_free_deferred+0x1ce/0x420 kernel/bpf/syscall.c:746
 process_one_work+0x958/0x1ad0 kernel/workqueue.c:3231
 process_scheduled_works kernel/workqueue.c:3312 [inline]
 worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393
 kthread+0x2c1/0x3a0 kernel/kthread.c:389
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:free_all kernel/bpf/memalloc.c:272 [inline]
RIP: 0010:drain_mem_cache+0x433/0x610 kernel/bpf/memalloc.c:647
Code: 75 1c eb 78 e8 8e ba da ff 48 89 ef e8 e6 9f 2d 00 e8 81 ba da ff 4d 85 ed 74 61 4c 89 ed e8 74 ba da ff 48 89 e8 48 c1 e8 03 <42> 80 3c 30 00 0f 85 08 01 00 00 31 ff 89 de 4c 8b 6d 00 e8 55 b5
RSP: 0018:ffffc900006bfb58 EFLAGS: 00010207
RAX: 0000000000000005 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888018cfa440 RSI: ffffffff81b3ca2c RDI: ffffe8ffad3590f0
RBP: 000000000000002d R08: 0000000000000000 R09: ffffed10058289a0
R10: ffff88802c144d03 R11: 0000000000000002 R12: ffffe8ffad359050
R13: 0000000000000000 R14: dffffc0000000000 R15: ffffe8ffad2590e8
FS:  0000000000000000(0000) GS:ffff88802c000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000f7f14ea0 CR3: 0000000026748000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	75 1c                	jne    0x1e
   2:	eb 78                	jmp    0x7c
   4:	e8 8e ba da ff       	call   0xffdaba97
   9:	48 89 ef             	mov    %rbp,%rdi
   c:	e8 e6 9f 2d 00       	call   0x2d9ff7
  11:	e8 81 ba da ff       	call   0xffdaba97
  16:	4d 85 ed             	test   %r13,%r13
  19:	74 61                	je     0x7c
  1b:	4c 89 ed             	mov    %r13,%rbp
  1e:	e8 74 ba da ff       	call   0xffdaba97
  23:	48 89 e8             	mov    %rbp,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 30 00       	cmpb   $0x0,(%rax,%r14,1) <-- trapping instruction
  2f:	0f 85 08 01 00 00    	jne    0x13d
  35:	31 ff                	xor    %edi,%edi
  37:	89 de                	mov    %ebx,%esi
  39:	4c 8b 6d 00          	mov    0x0(%rbp),%r13
  3d:	e8                   	.byte 0xe8
  3e:	55                   	push   %rbp
  3f:	b5                   	.byte 0xb5

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/21 11:42 upstream 8f6a15f095a6 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in drain_mem_cache
* Struck through repros no longer work on HEAD.