syzbot


general protection fault in flush_tlb_func

Status: premoderation: reported on 2024/03/25 18:24
Reported-by: syzbot+c682c5b6391f8b07110e@syzkaller.appspotmail.com
First crash: 40d, last: 3h52m

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000065: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000328-0x000000000000032f]
CPU: 0 PID: 23837 Comm: syz-executor.0 Tainted: G        W         5.15.148-syzkaller-00718-g993bed180178 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
RIP: 0010:arch_atomic64_read arch/x86/include/asm/atomic64_64.h:22 [inline]
RIP: 0010:atomic64_read include/linux/atomic/atomic-instrumented.h:606 [inline]
RIP: 0010:flush_tlb_func+0x4a/0x550 arch/x86/mm/tlb.c:736
Code: 8b 35 ca 8b cd 7e 65 66 44 8b 25 d1 8b cd 7e 49 8d 9e 28 03 00 00 48 89 df be 08 00 00 00 e8 ed 5a 7c 00 48 89 d8 48 c1 e8 03 <42> 80 3c 38 00 74 08 48 89 df e8 f7 58 7c 00 4c 8b 3b 66 44 89 65
RSP: 0018:ffffc90000007a60 EFLAGS: 00010006
RAX: 0000000000000065 RBX: 0000000000000329 RCX: ffffffff8135d913
RDX: 0000000000000000 RSI: 0000000000000092 RDI: 0000000000000329
RBP: ffffc90000007ad0 R08: ffffffff81656121 R09: fffffbfff0e0c746
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1103ee00000
R13: ffff8881f7136580 R14: 0000000000000001 R15: dffffc0000000000
FS:  00007fd6b121f6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b31d21000 CR3: 00000001106ed000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
Call Trace:
 <IRQ>
 flush_smp_call_function_queue+0x222/0x6a0 kernel/smp.c:628
 generic_smp_call_function_single_interrupt+0x13/0x20 kernel/smp.c:544
 __sysvec_call_function_single+0x63/0x1b0 arch/x86/kernel/smp.c:248
 sysvec_call_function_single+0x41/0xb0 arch/x86/kernel/smp.c:243
 asm_sysvec_call_function_single+0x1b/0x20 arch/x86/include/asm/idtentry.h:646
RIP: 0010:list_empty include/linux/list.h:290 [inline]
RIP: 0010:ext4_free_in_core_inode+0x36/0xb0 fs/ext4/super.c:1337
Code: 49 bf 00 00 00 00 00 fc ff df e8 c5 5e 79 ff 4c 89 f7 e8 8d 48 d9 ff 49 8d 9e 50 ff ff ff 48 89 d8 48 c1 e8 03 42 80 3c 38 00 <74> 08 48 89 df e8 40 6f bb ff 48 8b 03 48 39 d8 75 22 e8 93 5e 79
RSP: 0018:ffffc90000007c38 EFLAGS: 00000246
RAX: 1ffff1102be495ed RBX: ffff88815f24af68 RCX: ffff88811a72bb40
RDX: 0000000080000104 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000007c50 R08: ffffffff81d00b9c R09: ffffed103ee07002
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88815f24b168
R13: 0000000000000001 R14: ffff88815f24b018 R15: dffffc0000000000
 i_callback+0x4b/0x70 fs/inode.c:225
 rcu_do_batch+0x57a/0xc10 kernel/rcu/tree.c:2523
 rcu_core+0x517/0x1020 kernel/rcu/tree.c:2763
 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2776
 __do_softirq+0x26d/0x5bf kernel/softirq.c:565
 do_softirq+0xf6/0x150 kernel/softirq.c:452
 </IRQ>
 <TASK>
 __local_bh_enable_ip+0x75/0x80 kernel/softirq.c:379
 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:176 [inline]
 _raw_spin_unlock_bh+0x51/0x60 kernel/locking/spinlock.c:210
 sock_hash_delete_elem+0x2a2/0x2f0 net/core/sock_map.c:945
 bpf_prog_2c29ac5cdc6b1842+0x3a/0x958
 bpf_dispatcher_nop_func include/linux/bpf.h:785 [inline]
 __bpf_prog_run include/linux/filter.h:625 [inline]
 bpf_prog_run include/linux/filter.h:632 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:1883 [inline]
 bpf_trace_run2+0xec/0x210 kernel/trace/bpf_trace.c:1920
 __bpf_trace_tlb_flush+0x23/0x30 include/trace/events/tlb.h:38
 trace_tlb_flush include/trace/events/tlb.h:38 [inline]
 switch_mm_irqs_off+0x616/0x9b0 arch/x86/mm/tlb.c:629
 context_switch kernel/sched/core.c:5137 [inline]
 __schedule+0xb2b/0x1590 kernel/sched/core.c:6512
 preempt_schedule_common+0x9b/0xf0 kernel/sched/core.c:6688
 preempt_schedule+0xd9/0xe0 kernel/sched/core.c:6713
 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34
 __kunmap_atomic include/linux/highmem-internal.h:220 [inline]
 clear_highpage include/linux/highmem.h:182 [inline]
 kernel_init_free_pages+0xa5/0xf0 mm/page_alloc.c:1407
 post_alloc_hook+0x105/0x1b0 mm/page_alloc.c:2599
 prep_new_page+0x1b/0x110 mm/page_alloc.c:2610
 get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4484
 __alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5776
 __alloc_pages_node include/linux/gfp.h:591 [inline]
 alloc_pages_node include/linux/gfp.h:605 [inline]
 bpf_ringbuf_area_alloc kernel/bpf/ringbuf.c:96 [inline]
 bpf_ringbuf_alloc+0xd0/0x3d0 kernel/bpf/ringbuf.c:133
 ringbuf_map_alloc+0x202/0x320 kernel/bpf/ringbuf.c:172
 find_and_alloc_map kernel/bpf/syscall.c:129 [inline]
 map_create+0x411/0x2050 kernel/bpf/syscall.c:857
 __sys_bpf+0x296/0x760 kernel/bpf/syscall.c:4609
 __do_sys_bpf kernel/bpf/syscall.c:4731 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:4729 [inline]
 __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:4729
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fd6b249dda9
Code: Unable to access opcode bytes at RIP 0x7fd6b249dd7f.
RSP: 002b:00007fd6b121f0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007fd6b25cbf80 RCX: 00007fd6b249dda9
RDX: 0000000000000048 RSI: 00000000200009c0 RDI: 0000000000000000
RBP: 00007fd6b24ea47a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fd6b25cbf80 R15: 00007ffefa772968
 </TASK>
Modules linked in:
---[ end trace 9bb99783ce9b2f58 ]---
RIP: 0010:arch_atomic64_read arch/x86/include/asm/atomic64_64.h:22 [inline]
RIP: 0010:atomic64_read include/linux/atomic/atomic-instrumented.h:606 [inline]
RIP: 0010:flush_tlb_func+0x4a/0x550 arch/x86/mm/tlb.c:736
Code: 8b 35 ca 8b cd 7e 65 66 44 8b 25 d1 8b cd 7e 49 8d 9e 28 03 00 00 48 89 df be 08 00 00 00 e8 ed 5a 7c 00 48 89 d8 48 c1 e8 03 <42> 80 3c 38 00 74 08 48 89 df e8 f7 58 7c 00 4c 8b 3b 66 44 89 65
RSP: 0018:ffffc90000007a60 EFLAGS: 00010006
RAX: 0000000000000065 RBX: 0000000000000329 RCX: ffffffff8135d913
RDX: 0000000000000000 RSI: 0000000000000092 RDI: 0000000000000329
RBP: ffffc90000007ad0 R08: ffffffff81656121 R09: fffffbfff0e0c746
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1103ee00000
R13: ffff8881f7136580 R14: 0000000000000001 R15: dffffc0000000000
FS:  00007fd6b121f6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b31d21000 CR3: 00000001106ed000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
----------------
Code disassembly (best guess):
   0:	8b 35 ca 8b cd 7e    	mov    0x7ecd8bca(%rip),%esi        # 0x7ecd8bd0
   6:	65 66 44 8b 25 d1 8b 	mov    %gs:0x7ecd8bd1(%rip),%r12w        # 0x7ecd8be0
   d:	cd 7e
   f:	49 8d 9e 28 03 00 00 	lea    0x328(%r14),%rbx
  16:	48 89 df             	mov    %rbx,%rdi
  19:	be 08 00 00 00       	mov    $0x8,%esi
  1e:	e8 ed 5a 7c 00       	call   0x7c5b10
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	48 89 df             	mov    %rbx,%rdi
  34:	e8 f7 58 7c 00       	call   0x7c5930
  39:	4c 8b 3b             	mov    (%rbx),%r15
  3c:	66                   	data16
  3d:	44                   	rex.R
  3e:	89                   	.byte 0x89
  3f:	65                   	gs

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/25 18:23 android13-5.15-lts 993bed180178 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf general protection fault in flush_tlb_func
2024/05/05 04:18 android13-5.15-lts 5d96939590c0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: null-ptr-deref Read in flush_tlb_func
2024/05/02 04:26 android13-5.15-lts 5d96939590c0 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: null-ptr-deref Read in flush_tlb_func
2024/03/30 09:51 android13-5.15-lts 993bed180178 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: null-ptr-deref Read in flush_tlb_func
* Struck through repros no longer work on HEAD.