==================================================================
BUG: KASAN: use-after-free in pn533_acr122_is_rx_frame_valid drivers/nfc/pn533/usb.c:325 [inline]
BUG: KASAN: use-after-free in pn533_acr122_is_rx_frame_valid+0x132/0x150 drivers/nfc/pn533/usb.c:315
Read of size 1 at addr ffff8881c7a5670e by task syz.0.37/5358
CPU: 0 UID: 0 PID: 5358 Comm: syz.0.37 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1c0 mm/kasan/report.c:595
pn533_acr122_is_rx_frame_valid drivers/nfc/pn533/usb.c:325 [inline]
pn533_acr122_is_rx_frame_valid+0x132/0x150 drivers/nfc/pn533/usb.c:315
pn533_recv_frame+0x1b7/0x6d0 drivers/nfc/pn533/pn533.c:2203
__usb_hcd_giveback_urb+0x38e/0x610 drivers/usb/core/hcd.c:1657
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741
dummy_timer+0xdb2/0x3700 drivers/usb/gadget/udc/dummy_hcd.c:2019
__run_hrtimer kernel/time/hrtimer.c:2067 [inline]
__hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2124
hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2141
handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645
__do_softirq kernel/softirq.c:679 [inline]
invoke_softirq kernel/softirq.c:519 [inline]
__irq_exit_rcu+0x168/0x210 kernel/softirq.c:758
irq_exit_rcu+0x9/0x30 kernel/softirq.c:775
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:211 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:221
Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 56 e7 05 fa 48 89 df e8 de 3d 06 fa f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 65 93 f8 f9 65 48 83 3d d4 fe 98 05 00 74 16 5b
RSP: 0018:ffffc90002bd7c08 EFLAGS: 00000246
RAX: 0000000000000006 RBX: ffff888109fc4000 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffffffff89329f40 RDI: ffffffff87d2b780
RBP: 0000000000000246 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000010
R13: ffff888109fc51c8 R14: ffff888109fc40b8 R15: ffff88812289166c
spin_unlock_irqrestore include/linux/spinlock.h:425 [inline]
dummy_queue+0x3c5/0xb00 drivers/usb/gadget/udc/dummy_hcd.c:769
usb_ep_queue+0xfa/0x3c0 drivers/usb/gadget/udc/core.c:305
raw_process_ep_io+0x64d/0xc40 drivers/usb/gadget/legacy/raw_gadget.c:1114
raw_ioctl_ep_write drivers/usb/gadget/legacy/raw_gadget.c:1153 [inline]
raw_ioctl+0x25a/0x2b80 drivers/usb/gadget/legacy/raw_gadget.c:1325
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl fs/ioctl.c:583 [inline]
__x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb37b90ddeb
Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
RSP: 002b:00007fb37a365f60 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000010 RCX: 00007fb37b90ddeb
RDX: 00007fb37a365fe0 RSI: 0000000040085507 RDI: 0000000000000003
RBP: 0000000000000003 R08: 00007fb37bcc0320 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000246 R12: 0000200000000b00
R13: 0000000000000000 R14: 00007fb37bb95fa0 R15: 00007ffefd74ada8
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1c7a56
flags: 0x200000000000000(node=0|zone=2)
raw: 0200000000000000 ffffea00071e9588 ffffea00071e9588 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner info is not present (never set?)
Memory state around the buggy address:
ffff8881c7a56600: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881c7a56680: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881c7a56700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8881c7a56780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881c7a56800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
Code disassembly (best guess):
0: f5 cmc
1: 53 push %rbx
2: 48 8b 74 24 10 mov 0x10(%rsp),%rsi
7: 48 89 fb mov %rdi,%rbx
a: 48 83 c7 18 add $0x18,%rdi
e: e8 56 e7 05 fa call 0xfa05e769
13: 48 89 df mov %rbx,%rdi
16: e8 de 3d 06 fa call 0xfa063df9
1b: f7 c5 00 02 00 00 test $0x200,%ebp
21: 75 23 jne 0x46
23: 9c pushf
24: 58 pop %rax
25: f6 c4 02 test $0x2,%ah
28: 75 37 jne 0x61
* 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction
2f: e8 65 93 f8 f9 call 0xf9f89399
34: 65 48 83 3d d4 fe 98 cmpq $0x0,%gs:0x598fed4(%rip) # 0x598ff11
3b: 05 00
3d: 74 16 je 0x55
3f: 5b pop %rbx