syzbot


general protection fault in pn533_out_complete

Status: fixed on 2023/06/08 14:41
Subsystems: nfc
[Documentation on labels]
Reported-by: syzbot+1e608ba4217c96d1952f@syzkaller.appspotmail.com
Fix commit: 484b7059796e nfc: pn533: initialize struct pn533_out_arg properly
First crash: 472d, last: 453d
Cause bisection: failed (error log, bisect log)
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] nfc: pn533: initialize struct pn533_out_arg properly 9 (9) 2023/03/11 00:00
[syzbot] general protection fault in pn533_out_complete 0 (1) 2023/01/14 06:45
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/01/14 11:47 21m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 435bf71af3a0 OK log

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.2.0-rc3-next-20230110-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:pn533_out_complete.cold+0x15/0x44 drivers/nfc/pn533/usb.c:441
Code: df e8 aa 07 fa f7 e9 39 ff ff ff 48 89 df e8 9d 07 fa f7 eb e0 e8 d6 19 ac f7 4c 89 ea b8 ff ff 37 00 48 c1 ea 03 48 c1 e0 2a <80> 3c 02 00 75 1f 49 8b 7d 00 44 89 e2 48 c7 c6 80 be d0 8a 48 81
RSP: 0018:ffffc900001e0a58 EFLAGS: 00010086
RAX: dffffc0000000000 RBX: ffff88801f705800 RCX: 0000000000000100
RDX: 0000000000000000 RSI: ffffffff89d5a3ea RDI: 0000000000000005
RBP: ffffc90000a1ee70 R08: 0000000000000005 R09: 0000000000000000
R10: ffffffffffffffb9 R11: 0000000000000001 R12: ffffffffffffffb9
R13: 0000000000000000 R14: 0100000000000001 R15: 00000000ffffffb9
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fffc3520bb0 CR3: 00000000262ac000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 __usb_hcd_giveback_urb+0x2b6/0x5c0 drivers/usb/core/hcd.c:1671
 usb_hcd_giveback_urb+0x384/0x430 drivers/usb/core/hcd.c:1754
 dummy_timer+0x1203/0x32d0 drivers/usb/gadget/udc/dummy_hcd.c:1988
 call_timer_fn+0x1da/0x800 kernel/time/timer.c:1700
 expire_timers+0x234/0x330 kernel/time/timer.c:1751
 __run_timers kernel/time/timer.c:2022 [inline]
 __run_timers kernel/time/timer.c:1995 [inline]
 run_timer_softirq+0x326/0x910 kernel/time/timer.c:2035
 __do_softirq+0x1fb/0xaf6 kernel/softirq.c:571
 invoke_softirq kernel/softirq.c:445 [inline]
 __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650
 irq_exit_rcu+0x9/0x20 kernel/softirq.c:662
 sysvec_apic_timer_interrupt+0x97/0xc0 arch/x86/kernel/apic/apic.c:1107
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649
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:113 [inline]
RIP: 0010:acpi_idle_do_entry+0x1fd/0x2a0 drivers/acpi/processor_idle.c:570
Code: 89 de e8 c6 c5 7a f7 84 db 75 ac e8 4d c9 7a f7 e8 c8 49 81 f7 66 90 e8 41 c9 7a f7 0f 00 2d ba cc aa 00 e8 35 c9 7a f7 fb f4 <9c> 5b 81 e3 00 02 00 00 fa 31 ff 48 89 de e8 f0 c5 7a f7 48 85 db
RSP: 0018:ffffc90000177d10 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88813fe71d40 RSI: ffffffff8a06f48b RDI: 0000000000000000
RBP: ffff88813ff2a864 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001
R13: ffff88813ff2a800 R14: ffff88813ff2a864 R15: ffff88801867f004
 acpi_idle_enter+0x368/0x510 drivers/acpi/processor_idle.c:707
 cpuidle_enter_state+0x1af/0xd40 drivers/cpuidle/cpuidle.c:239
 cpuidle_enter+0x4e/0xa0 drivers/cpuidle/cpuidle.c:356
 call_cpuidle kernel/sched/idle.c:155 [inline]
 cpuidle_idle_call kernel/sched/idle.c:236 [inline]
 do_idle+0x3f7/0x590 kernel/sched/idle.c:303
 cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:400
 start_secondary+0x256/0x300 arch/x86/kernel/smpboot.c:264
 secondary_startup_64_no_verify+0xce/0xdb
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:pn533_out_complete.cold+0x15/0x44 drivers/nfc/pn533/usb.c:441
Code: df e8 aa 07 fa f7 e9 39 ff ff ff 48 89 df e8 9d 07 fa f7 eb e0 e8 d6 19 ac f7 4c 89 ea b8 ff ff 37 00 48 c1 ea 03 48 c1 e0 2a <80> 3c 02 00 75 1f 49 8b 7d 00 44 89 e2 48 c7 c6 80 be d0 8a 48 81
RSP: 0018:ffffc900001e0a58 EFLAGS: 00010086
RAX: dffffc0000000000 RBX: ffff88801f705800 RCX: 0000000000000100
RDX: 0000000000000000 RSI: ffffffff89d5a3ea RDI: 0000000000000005
RBP: ffffc90000a1ee70 R08: 0000000000000005 R09: 0000000000000000
R10: ffffffffffffffb9 R11: 0000000000000001 R12: ffffffffffffffb9
R13: 0000000000000000 R14: 0100000000000001 R15: 00000000ffffffb9
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fffc3520bb0 CR3: 00000000262ac000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	e8 aa 07 fa f7       	callq  0xf7fa07af
   5:	e9 39 ff ff ff       	jmpq   0xffffff43
   a:	48 89 df             	mov    %rbx,%rdi
   d:	e8 9d 07 fa f7       	callq  0xf7fa07af
  12:	eb e0                	jmp    0xfffffff4
  14:	e8 d6 19 ac f7       	callq  0xf7ac19ef
  19:	4c 89 ea             	mov    %r13,%rdx
  1c:	b8 ff ff 37 00       	mov    $0x37ffff,%eax
  21:	48 c1 ea 03          	shr    $0x3,%rdx
  25:	48 c1 e0 2a          	shl    $0x2a,%rax
* 29:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2d:	75 1f                	jne    0x4e
  2f:	49 8b 7d 00          	mov    0x0(%r13),%rdi
  33:	44 89 e2             	mov    %r12d,%edx
  36:	48 c7 c6 80 be d0 8a 	mov    $0xffffffff8ad0be80,%rsi
  3d:	48                   	rex.W
  3e:	81                   	.byte 0x81

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/10 14:04 linux-next 435bf71af3a0 1dac8c7a .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pn533_out_complete
2023/01/13 18:32 upstream d9fc1511728c 529798b0 .config console log report info ci-upstream-kasan-gce general protection fault in pn533_out_complete
2023/01/13 18:07 upstream d9fc1511728c 529798b0 .config console log report info ci-upstream-kasan-gce general protection fault in pn533_out_complete
2023/01/13 16:28 upstream d9fc1511728c 529798b0 .config console log report info ci-upstream-kasan-gce general protection fault in pn533_out_complete
2023/01/13 16:26 upstream d9fc1511728c 529798b0 .config console log report info ci-upstream-kasan-gce general protection fault in pn533_out_complete
2023/01/13 16:21 upstream d9fc1511728c 529798b0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root general protection fault in pn533_out_complete
2023/01/13 18:32 upstream d9fc1511728c 529798b0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 general protection fault in pn533_out_complete
2023/01/13 18:14 upstream d9fc1511728c 529798b0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 general protection fault in pn533_out_complete
2023/01/13 16:54 upstream d9fc1511728c 529798b0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 general protection fault in pn533_out_complete
2023/01/13 16:09 upstream d9fc1511728c 529798b0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 general protection fault in pn533_out_complete
2023/01/28 15:53 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing c52c9acc415e 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb general protection fault in pn533_out_complete
2023/01/11 15:50 linux-next c9e9cdd8bdcc 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pn533_out_complete
2023/01/11 15:39 linux-next c9e9cdd8bdcc 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pn533_out_complete
2023/01/10 09:16 linux-next 435bf71af3a0 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pn533_out_complete
2023/01/10 06:38 linux-next 435bf71af3a0 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pn533_out_complete
* Struck through repros no longer work on HEAD.