syzbot


general protection fault in llc_alloc_frame

Status: internal: reported on 2022/03/26 05:53
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: 2d327a79ee17 llc: only change llc->dev when bind() succeeds
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 95d, last: 95d

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000025: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000128-0x000000000000012f]
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W         5.17.0-syzkaller-04796-g169e77764adc #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:llc_alloc_frame+0x55/0x300 net/llc/llc_sap.c:54
Code: 1c fa 80 fb 03 41 0f 95 c6 e8 d7 5d 1c fa 48 8d bd 28 01 00 00 41 83 c6 03 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 01 0f 8e 37 02 00 00 0f b7 bd 28 01 00
RSP: 0018:ffffc90000007c08 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000003 RCX: 0000000000000100
RDX: 0000000000000025 RSI: ffffffff875cb549 RDI: 0000000000000128
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000003
R10: ffffffff875cb53d R11: 0000000000000003 R12: 0000000000000000
R13: ffff88804a613000 R14: 0000000000000003 R15: ffff88804a613000
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb01c5e2718 CR3: 0000000053f6e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 llc_conn_ac_send_sabme_cmd_p_set_x+0x4e/0x450 net/llc/llc_c_ac.c:780
 llc_exec_conn_trans_actions net/llc/llc_conn.c:442 [inline]
 llc_conn_service net/llc/llc_conn.c:367 [inline]
 llc_conn_state_process+0x3c8/0x1420 net/llc/llc_conn.c:71
 llc_process_tmr_ev net/llc/llc_c_ac.c:1445 [inline]
 llc_conn_tmr_common_cb+0x2bb/0x8b0 net/llc/llc_c_ac.c:1331
 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421
 expire_timers kernel/time/timer.c:1466 [inline]
 __run_timers.part.0+0x67c/0xa30 kernel/time/timer.c:1734
 __run_timers kernel/time/timer.c:1715 [inline]
 run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747
 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558
 invoke_softirq kernel/softirq.c:432 [inline]
 __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637
 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:29 [inline]
RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:70 [inline]
RIP: 0010:arch_irqs_disabled arch/x86/include/asm/irqflags.h:130 [inline]
RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:116 [inline]
RIP: 0010:acpi_idle_do_entry+0x1c6/0x250 drivers/acpi/processor_idle.c:556
Code: 89 de e8 dd 8e 14 f8 84 db 75 ac e8 54 8c 14 f8 e8 4f d2 1a f8 eb 0c e8 48 8c 14 f8 0f 00 2d 61 70 cd 00 e8 3c 8c 14 f8 fb f4 <9c> 5b 81 e3 00 02 00 00 fa 31 ff 48 89 de e8 17 90 14 f8 48 85 db
RSP: 0018:ffffffff8ba07d60 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffffffff8babc6c0 RSI: ffffffff896486e4 RDI: ffffffff896486d1
RBP: ffff888142de7064 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff817f5958 R11: 0000000000000000 R12: 0000000000000001
R13: ffff888142de7000 R14: ffff888142de7064 R15: ffff888018541004
 acpi_idle_enter+0x361/0x500 drivers/acpi/processor_idle.c:692
 cpuidle_enter_state+0x1b1/0xc80 drivers/cpuidle/cpuidle.c:237
 cpuidle_enter+0x4a/0xa0 drivers/cpuidle/cpuidle.c:351
 call_cpuidle kernel/sched/idle.c:155 [inline]
 cpuidle_idle_call kernel/sched/idle.c:236 [inline]
 do_idle+0x3e8/0x590 kernel/sched/idle.c:303
 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:400
 start_kernel+0x47f/0x4a0 init/main.c:1140
 secondary_startup_64_no_verify+0xc3/0xcb
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:llc_alloc_frame+0x55/0x300 net/llc/llc_sap.c:54
Code: 1c fa 80 fb 03 41 0f 95 c6 e8 d7 5d 1c fa 48 8d bd 28 01 00 00 41 83 c6 03 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 01 0f 8e 37 02 00 00 0f b7 bd 28 01 00
RSP: 0018:ffffc90000007c08 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000003 RCX: 0000000000000100
RDX: 0000000000000025 RSI: ffffffff875cb549 RDI: 0000000000000128
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000003
R10: ffffffff875cb53d R11: 0000000000000003 R12: 0000000000000000
R13: ffff88804a613000 R14: 0000000000000003 R15: ffff88804a613000
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb01c5e2718 CR3: 0000000053f6e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	1c fa                	sbb    $0xfa,%al
   2:	80 fb 03             	cmp    $0x3,%bl
   5:	41 0f 95 c6          	setne  %r14b
   9:	e8 d7 5d 1c fa       	callq  0xfa1c5de5
   e:	48 8d bd 28 01 00 00 	lea    0x128(%rbp),%rdi
  15:	41 83 c6 03          	add    $0x3,%r14d
  19:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  20:	fc ff df
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	0f b6 04 02          	movzbl (%rdx,%rax,1),%eax <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	74 08                	je     0x3a
  32:	3c 01                	cmp    $0x1,%al
  34:	0f 8e 37 02 00 00    	jle    0x271
  3a:	0f                   	.byte 0xf
  3b:	b7 bd                	mov    $0xbd,%bh
  3d:	28 01                	sub    %al,(%rcx)

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-net-kasan-gce 2022/03/26 05:52 net-next 169e77764adc 89bc8608 .config log report info general protection fault in llc_alloc_frame