syzbot


general protection fault in drain_mem_cache (3)

Status: moderation: reported on 2025/04/04 23:10
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+9fdf55f5d71053231104@syzkaller.appspotmail.com
First crash: 4d16h, last: 4d16h
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in drain_mem_cache (2) bpf 1 211d 207d 0/28 auto-obsoleted due to no activity on 2024/12/05 06:33
upstream general protection fault in drain_mem_cache bpf 1 319d 315d 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] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 2997 Comm: kworker/u8:9 Not tainted 6.14.0-next-20250331-syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Workqueue: events_unbound bpf_map_free_deferred
RIP: 0010:free_all kernel/bpf/memalloc.c:268 [inline]
RIP: 0010:drain_mem_cache+0x104/0x4b0 kernel/bpf/memalloc.c:639
Code: 00 e8 40 cc 3f 00 31 db 49 87 9e b0 00 00 00 48 85 db 75 0f e8 6d af d5 ff eb 67 e8 66 af d5 ff 4c 89 fb 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 6d c9 3f 00 4c 8b 3b 45 85 e4 74
RSP: 0018:ffffc9000b5f7a20 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000002 RCX: ffffffff81eda500
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffe8ffffc6bc20
RBP: ffffe8ffffc6bb70 R08: ffffe8ffffc6bc27 R09: 1ffffd1ffff8d784
R10: dffffc0000000000 R11: fffff91ffff8d785 R12: 0000000000000000
R13: dffffc0000000000 R14: ffffe8ffffc6bb70 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff888125095000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fbd53005000 CR3: 000000007ad66000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bpf_mem_alloc_destroy+0x14a/0x4e0 kernel/bpf/memalloc.c:754
 trie_free+0x136/0x160 kernel/bpf/lpm_trie.c:652
 bpf_map_free kernel/bpf/syscall.c:861 [inline]
 bpf_map_free_deferred+0xe9/0x110 kernel/bpf/syscall.c:887
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0xac3/0x18e0 kernel/workqueue.c:3319
 worker_thread+0x870/0xd50 kernel/workqueue.c:3400
 kthread+0x7b7/0x940 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:free_all kernel/bpf/memalloc.c:268 [inline]
RIP: 0010:drain_mem_cache+0x104/0x4b0 kernel/bpf/memalloc.c:639
Code: 00 e8 40 cc 3f 00 31 db 49 87 9e b0 00 00 00 48 85 db 75 0f e8 6d af d5 ff eb 67 e8 66 af d5 ff 4c 89 fb 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 6d c9 3f 00 4c 8b 3b 45 85 e4 74
RSP: 0018:ffffc9000b5f7a20 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000002 RCX: ffffffff81eda500
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffe8ffffc6bc20
RBP: ffffe8ffffc6bb70 R08: ffffe8ffffc6bc27 R09: 1ffffd1ffff8d784
R10: dffffc0000000000 R11: fffff91ffff8d785 R12: 0000000000000000
R13: dffffc0000000000 R14: ffffe8ffffc6bb70 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff888125095000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f740cf08000 CR3: 0000000025c74000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	e8 40 cc 3f 00       	call   0x3fcc45
   5:	31 db                	xor    %ebx,%ebx
   7:	49 87 9e b0 00 00 00 	xchg   %rbx,0xb0(%r14)
   e:	48 85 db             	test   %rbx,%rbx
  11:	75 0f                	jne    0x22
  13:	e8 6d af d5 ff       	call   0xffd5af85
  18:	eb 67                	jmp    0x81
  1a:	e8 66 af d5 ff       	call   0xffd5af85
  1f:	4c 89 fb             	mov    %r15,%rbx
  22:	48 89 d8             	mov    %rbx,%rax
  25:	48 c1 e8 03          	shr    $0x3,%rax
* 29:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1) <-- trapping instruction
  2e:	74 08                	je     0x38
  30:	48 89 df             	mov    %rbx,%rdi
  33:	e8 6d c9 3f 00       	call   0x3fc9a5
  38:	4c 8b 3b             	mov    (%rbx),%r15
  3b:	45 85 e4             	test   %r12d,%r12d
  3e:	74                   	.byte 0x74

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/31 23:00 linux-next 405e2241def8 36d76a97 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in drain_mem_cache
* Struck through repros no longer work on HEAD.