==================================================================
BUG: KASAN: use-after-free in pn533_acr122_is_rx_frame_valid+0x151/0x160 drivers/nfc/pn533/usb.c:325
Read of size 1 at addr ffff88808289e0d5 by task syz.5.1207/10720
CPU: 1 UID: 0 PID: 10720 Comm: syz.5.1207 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
pn533_acr122_is_rx_frame_valid+0x151/0x160 drivers/nfc/pn533/usb.c:325
pn533_recv_frame+0x1c0/0x6d0 drivers/nfc/pn533/pn533.c:2203
__usb_hcd_giveback_urb+0x378/0x540 drivers/usb/core/hcd.c:1657
dummy_timer+0xa91/0x4cf0 drivers/usb/gadget/udc/dummy_hcd.c:2019
__run_hrtimer kernel/time/hrtimer.c:2067 [inline]
__hrtimer_run_queues+0x3bc/0xa10 kernel/time/hrtimer.c:2124
hrtimer_run_softirq+0x1e3/0x2e0 kernel/time/hrtimer.c:2141
handle_softirqs+0x226/0x860 kernel/softirq.c:645
__do_softirq kernel/softirq.c:679 [inline]
invoke_softirq kernel/softirq.c:519 [inline]
__irq_exit_rcu+0xcb/0x220 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+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:stack_trace_consume_entry+0x97/0x280 kernel/stacktrace.c:93
Code: 00 44 8b 23 45 85 e4 74 21 41 ff cc 41 0f b6 04 17 84 c0 0f 85 78 01 00 00 44 89 23 b0 01 e9 99 00 00 00 31 c0 e9 92 00 00 00 <48> 89 f8 48 c1 e8 03 80 3c 10 00 74 29 49 89 ff 48 89 74 24 08 49
RSP: 0018:ffffc900033571d8 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffc900033572ec RCX: 0000000000000000
RDX: dffffc0000000000 RSI: ffffffff823916ef RDI: ffffc900033572e0
RBP: 1ffff9200066ae5e R08: ffffc900033572f0 R09: 0000000000000003
R10: ffffc90003357278 R11: ffffffff81b28090 R12: 0000000000000000
R13: 1ffff9200066ae5d R14: ffffc900033572e8 R15: 1ffff9200066ae5d
arch_stack_walk+0x10f/0x150 arch/x86/kernel/stacktrace.c:27
stack_trace_save+0xa9/0x100 kernel/stacktrace.c:122
save_stack+0x122/0x230 mm/page_owner.c:183
__reset_page_owner+0x71/0x1f0 mm/page_owner.c:338
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1418 [inline]
__free_frozen_pages+0xc93/0xd90 mm/page_alloc.c:2962
__folio_put+0x4b3/0x590 mm/folio.c:105
folio_put include/linux/mm.h:2160 [inline]
migrate_folio_done mm/migrate.c:1209 [inline]
migrate_folio_move mm/migrate.c:1440 [inline]
migrate_folios_move mm/migrate.c:1749 [inline]
migrate_pages_batch+0x3c61/0x4f50 mm/migrate.c:2005
migrate_pages_sync mm/migrate.c:2035 [inline]
migrate_pages+0x1b9f/0x2920 mm/migrate.c:2144
do_mbind mm/mempolicy.c:1617 [inline]
kernel_mbind mm/mempolicy.c:1760 [inline]
__do_sys_mbind mm/mempolicy.c:1834 [inline]
__se_sys_mbind+0xe82/0x10e0 mm/mempolicy.c:1830
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f965159e159
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f965250b028 EFLAGS: 00000246 ORIG_RAX: 00000000000000ed
RAX: ffffffffffffffda RBX: 00007f9651825fa0 RCX: 00007f965159e159
RDX: 0000000000000000 RSI: 0000000000c00000 RDI: 0000200000000000
RBP: 00007f965163503b R08: 0000000000000000 R09: 0000000000000002
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9651826038 R14: 00007f9651825fa0 R15: 00007f965194fa48
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x8289e
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea00020a2788 ffffea00020a2788 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x29c2(GFP_NOWAIT|__GFP_HIGHMEM|__GFP_IO|__GFP_FS|__GFP_ZERO), pid 9776, tgid 9764 (syz.2.1013), ts 321053394804
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871
prep_new_page mm/page_alloc.c:1879 [inline]
get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943
__alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436
alloc_pages_mpol+0x21e/0x390 mm/mempolicy.c:2486
alloc_frozen_pages_noprof mm/mempolicy.c:2557 [inline]
alloc_pages_noprof+0xb1/0x2b0 mm/mempolicy.c:2577
vm_area_alloc_pages mm/vmalloc.c:3689 [inline]
__vmalloc_area_node mm/vmalloc.c:3914 [inline]
__vmalloc_node_range_noprof+0x6e5/0x1540 mm/vmalloc.c:4104
vmalloc_user_noprof+0xad/0xe0 mm/vmalloc.c:4259
vb2_vmalloc_alloc+0xef/0x360 drivers/media/common/videobuf2/videobuf2-vmalloc.c:47
__vb2_buf_mem_alloc drivers/media/common/videobuf2/videobuf2-core.c:242 [inline]
__vb2_queue_alloc+0xa0b/0x1660 drivers/media/common/videobuf2/videobuf2-core.c:523
vb2_core_reqbufs+0xc3f/0x1470 drivers/media/common/videobuf2/videobuf2-core.c:958
vb2_ioctl_reqbufs+0x4bb/0x850 drivers/media/common/videobuf2/videobuf2-v4l2.c:1023
__video_do_ioctl+0x8af/0xc70 drivers/media/v4l2-core/v4l2-ioctl.c:3135
video_usercopy+0x860/0x1430 drivers/media/v4l2-core/v4l2-ioctl.c:3477
v4l2_ioctl+0x18d/0x1e0 drivers/media/v4l2-core/v4l2-dev.c:366
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
page last free pid 9776 tgid 9764 ts 322173335015 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1418 [inline]
free_pages_prepare+0x9eb/0xaf0 mm/page_alloc.c:1463
__free_contig_range_common+0x174/0x340 mm/page_alloc.c:7072
__free_contig_range mm/page_alloc.c:7117 [inline]
free_pages_bulk+0x48/0x120 mm/page_alloc.c:5322
vm_area_free_pages mm/vmalloc.c:3461 [inline]
vfree+0x231/0x490 mm/vmalloc.c:3510
vb2_vmalloc_put+0x68/0xb0 drivers/media/common/videobuf2/videobuf2-vmalloc.c:68
__vb2_buf_mem_free+0x113/0x2c0 drivers/media/common/videobuf2/videobuf2-core.c:275
__vb2_free_mem drivers/media/common/videobuf2/videobuf2-core.c:571 [inline]
__vb2_queue_free+0x404/0xac0 drivers/media/common/videobuf2/videobuf2-core.c:599
vb2_core_queue_release+0x6b/0x150 drivers/media/common/videobuf2/videobuf2-core.c:2679
vb2_queue_release drivers/media/common/videobuf2/videobuf2-v4l2.c:943 [inline]
_vb2_fop_release drivers/media/common/videobuf2/videobuf2-v4l2.c:1146 [inline]
vb2_fop_release+0x16e/0x200 drivers/media/common/videobuf2/videobuf2-v4l2.c:1160
v4l2_release+0x195/0x350 drivers/media/v4l2-core/v4l2-dev.c:468
__fput+0x418/0xa50 fs/file_table.c:512
task_work_run+0x1d9/0x270 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
exit_to_user_mode_loop+0x204/0x770 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:336 [inline]
do_syscall_64+0x328/0x520 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88808289df80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88808289e000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88808289e080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88808289e100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88808289e180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
Code disassembly (best guess):
0: 00 44 8b 23 add %al,0x23(%rbx,%rcx,4)
4: 45 85 e4 test %r12d,%r12d
7: 74 21 je 0x2a
9: 41 ff cc dec %r12d
c: 41 0f b6 04 17 movzbl (%r15,%rdx,1),%eax
11: 84 c0 test %al,%al
13: 0f 85 78 01 00 00 jne 0x191
19: 44 89 23 mov %r12d,(%rbx)
1c: b0 01 mov $0x1,%al
1e: e9 99 00 00 00 jmp 0xbc
23: 31 c0 xor %eax,%eax
25: e9 92 00 00 00 jmp 0xbc
* 2a: 48 89 f8 mov %rdi,%rax <-- trapping instruction
2d: 48 c1 e8 03 shr $0x3,%rax
31: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1)
35: 74 29 je 0x60
37: 49 89 ff mov %rdi,%r15
3a: 48 89 74 24 08 mov %rsi,0x8(%rsp)
3f: 49 rex.WB