syzbot


general protection fault in drain_mem_cache (2)

Status: moderation: reported on 2024/09/10 06:41
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+f1c96239f14ff5bb4dfa@syzkaller.appspotmail.com
First crash: 28d, last: 28d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in drain_mem_cache bpf 1 136d 132d 0/28 auto-obsoleted due to no activity on 2024/08/19 11:43

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 2 UID: 0 PID: 13 Comm: kworker/u32:1 Not tainted 6.11.0-rc6-syzkaller-00075-gad618736883b #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Workqueue: events_unbound bpf_map_free_deferred
RIP: 0010:free_all kernel/bpf/memalloc.c:269 [inline]
RIP: 0010:drain_mem_cache+0x2b2/0x610 kernel/bpf/memalloc.c:642
Code: 75 1c eb 78 e8 9f a5 da ff 48 89 ef e8 07 da 2e 00 e8 92 a5 da ff 4d 85 ed 74 61 4c 89 ed e8 85 a5 da ff 48 89 e8 48 c1 e8 03 <42> 80 3c 30 00 0f 85 a3 02 00 00 31 ff 89 de 4c 8b 6d 00 e8 a6 a7
RSP: 0018:ffffc90000107b58 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88801d6a8000 RSI: ffffffff81b11acb RDI: ffffe8fefc779da0
RBP: 0000000000000001 R08: 0000000000000000 R09: ffffed100d5089b0
R10: ffff88806a844d83 R11: 0000000000000000 R12: ffffe8fefc779d90
R13: 0000000000000000 R14: dffffc0000000000 R15: ffffe8fefc679e28
FS:  0000000000000000(0000) GS:ffff88806a800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9fb97dc780 CR3: 00000000479e4000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bpf_mem_alloc_destroy+0x152/0x6f0 kernel/bpf/memalloc.c:755
 htab_map_free+0x38c/0xb40 kernel/bpf/hashtab.c:1564
 bpf_map_free_deferred+0x1ce/0x420 kernel/bpf/syscall.c:746
 process_one_work+0x9c5/0x1b40 kernel/workqueue.c:3231
 process_scheduled_works kernel/workqueue.c:3312 [inline]
 worker_thread+0x6c8/0xed0 kernel/workqueue.c:3389
 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:269 [inline]
RIP: 0010:drain_mem_cache+0x2b2/0x610 kernel/bpf/memalloc.c:642
Code: 75 1c eb 78 e8 9f a5 da ff 48 89 ef e8 07 da 2e 00 e8 92 a5 da ff 4d 85 ed 74 61 4c 89 ed e8 85 a5 da ff 48 89 e8 48 c1 e8 03 <42> 80 3c 30 00 0f 85 a3 02 00 00 31 ff 89 de 4c 8b 6d 00 e8 a6 a7
RSP: 0018:ffffc90000107b58 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88801d6a8000 RSI: ffffffff81b11acb RDI: ffffe8fefc779da0
RBP: 0000000000000001 R08: 0000000000000000 R09: ffffed100d5089b0
R10: ffff88806a844d83 R11: 0000000000000000 R12: ffffe8fefc779d90
R13: 0000000000000000 R14: dffffc0000000000 R15: ffffe8fefc679e28
FS:  0000000000000000(0000) GS:ffff88806a900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3d89e67d60 CR3: 000000001bf80000 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 9f a5 da ff       	call   0xffdaa5a8
   9:	48 89 ef             	mov    %rbp,%rdi
   c:	e8 07 da 2e 00       	call   0x2eda18
  11:	e8 92 a5 da ff       	call   0xffdaa5a8
  16:	4d 85 ed             	test   %r13,%r13
  19:	74 61                	je     0x7c
  1b:	4c 89 ed             	mov    %r13,%rbp
  1e:	e8 85 a5 da ff       	call   0xffdaa5a8
  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 a3 02 00 00    	jne    0x2d8
  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:	a6                   	cmpsb  %es:(%rdi),%ds:(%rsi)
  3f:	a7                   	cmpsl  %es:(%rdi),%ds:(%rsi)

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/06 06:32 upstream ad618736883b 464ac2ed .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in drain_mem_cache
* Struck through repros no longer work on HEAD.