syzbot


general protection fault in drain_mem_cache (3)

Status: upstream: reported on 2025/04/14 17:56
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+18139576507d899c8066@syzkaller.appspotmail.com
First crash: 15d, last: 1d21h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bpf?] general protection fault in drain_mem_cache (3) 0 (1) 2025/04/14 17:56
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 222d 218d 0/28 auto-obsoleted due to no activity on 2024/12/05 06:33
upstream general protection fault in drain_mem_cache bpf 1 330d 326d 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 NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 UID: 0 PID: 6517 Comm: syz.3.129 Not tainted 6.15.0-rc2-syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:free_all kernel/bpf/memalloc.c:268 [inline]
RIP: 0010:drain_mem_cache+0x92/0x580 kernel/bpf/memalloc.c:638
Code: ff df 48 85 ed 75 17 eb 63 e8 9a 2f d9 ff 48 89 ef e8 12 ea 32 00 4d 85 ed 74 51 4c 89 ed e8 85 2f d9 ff 48 89 e8 48 c1 e8 03 <42> 80 3c 30 00 0f 85 57 04 00 00 31 ff 89 de 4c 8b 6d 00 e8 a6 2a
RSP: 0018:ffffc900035a7a58 EFLAGS: 00010256
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffc9000c74c000
RDX: 0000000000080000 RSI: ffffffff81e20d3b RDI: ffffe8ffffc3a7a0
RBP: 0000000000000001 R08: 0000000000000001 R09: fffff91ffff874f4
R10: ffffe8ffffc3a7a7 R11: 0000000000000000 R12: ffffe8ffffc3a6f8
R13: ffff88807d5941d0 R14: dffffc0000000000 R15: ffff88807d594018
FS:  00007ff686c4b6c0(0000) GS:ffff8881249b9000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000110c3406c4 CR3: 0000000052f32000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 bpf_mem_alloc_destroy+0x145/0x6d0 kernel/bpf/memalloc.c:754
 htab_map_free+0x37f/0xab0 kernel/bpf/hashtab.c:1551
 bpf_map_free kernel/bpf/syscall.c:861 [inline]
 map_create+0xe54/0x1db0 kernel/bpf/syscall.c:1557
 __sys_bpf+0x47cc/0x4d80 kernel/bpf/syscall.c:5816
 __do_sys_bpf kernel/bpf/syscall.c:5941 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5939 [inline]
 __x64_sys_bpf+0x78/0xc0 kernel/bpf/syscall.c:5939
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff685d8d169
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff686c4b038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007ff685fa5fa0 RCX: 00007ff685d8d169
RDX: 0000000000000050 RSI: 00002000000008c0 RDI: 0000000000000000
RBP: 00007ff685e0e990 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007ff685fa5fa0 R15: 00007ffd6ccab8d8
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:free_all kernel/bpf/memalloc.c:268 [inline]
RIP: 0010:drain_mem_cache+0x92/0x580 kernel/bpf/memalloc.c:638
Code: ff df 48 85 ed 75 17 eb 63 e8 9a 2f d9 ff 48 89 ef e8 12 ea 32 00 4d 85 ed 74 51 4c 89 ed e8 85 2f d9 ff 48 89 e8 48 c1 e8 03 <42> 80 3c 30 00 0f 85 57 04 00 00 31 ff 89 de 4c 8b 6d 00 e8 a6 2a
RSP: 0018:ffffc900035a7a58 EFLAGS: 00010256
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffc9000c74c000
RDX: 0000000000080000 RSI: ffffffff81e20d3b RDI: ffffe8ffffc3a7a0
RBP: 0000000000000001 R08: 0000000000000001 R09: fffff91ffff874f4
R10: ffffe8ffffc3a7a7 R11: 0000000000000000 R12: ffffe8ffffc3a6f8
R13: ffff88807d5941d0 R14: dffffc0000000000 R15: ffff88807d594018
FS:  00007ff686c4b6c0(0000) GS:ffff8881249b9000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fdbb12d7d60 CR3: 0000000052f32000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	df 48 85             	fisttps -0x7b(%rax)
   3:	ed                   	in     (%dx),%eax
   4:	75 17                	jne    0x1d
   6:	eb 63                	jmp    0x6b
   8:	e8 9a 2f d9 ff       	call   0xffd92fa7
   d:	48 89 ef             	mov    %rbp,%rdi
  10:	e8 12 ea 32 00       	call   0x32ea27
  15:	4d 85 ed             	test   %r13,%r13
  18:	74 51                	je     0x6b
  1a:	4c 89 ed             	mov    %r13,%rbp
  1d:	e8 85 2f d9 ff       	call   0xffd92fa7
  22:	48 89 e8             	mov    %rbp,%rax
  25:	48 c1 e8 03          	shr    $0x3,%rax
* 29:	42 80 3c 30 00       	cmpb   $0x0,(%rax,%r14,1) <-- trapping instruction
  2e:	0f 85 57 04 00 00    	jne    0x48b
  34:	31 ff                	xor    %edi,%edi
  36:	89 de                	mov    %ebx,%esi
  38:	4c 8b 6d 00          	mov    0x0(%rbp),%r13
  3c:	e8                   	.byte 0xe8
  3d:	a6                   	cmpsb  %es:(%rdi),%ds:(%rsi)
  3e:	2a                   	.byte 0x2a

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/14 17:55 upstream 8ffd015db85f 0bd6db41 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in drain_mem_cache
2025/04/12 00:19 upstream 900241a5cc15 12ba9c21 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in drain_mem_cache
2025/04/12 00:19 upstream 900241a5cc15 12ba9c21 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in drain_mem_cache
2025/04/06 09:30 linux-next a4cda136f021 1c65791e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in drain_mem_cache
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.