================================================================== BUG: KASAN: slab-use-after-free in pn533_acr122_is_rx_frame_valid drivers/nfc/pn533/usb.c:325 [inline] BUG: KASAN: slab-use-after-free in pn533_acr122_is_rx_frame_valid+0x132/0x150 drivers/nfc/pn533/usb.c:315 Read of size 1 at addr ffff88807cf523d5 by task syz-executor/6901 CPU: 0 UID: 0 PID: 6901 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/05/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+0x1e6/0x9d0 kernel/softirq.c:645 __do_softirq kernel/softirq.c:679 [inline] invoke_softirq kernel/softirq.c:519 [inline] __irq_exit_rcu+0x16a/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+0xa3/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_access_ok+0x1d/0x1d0 arch/x86/kernel/unwind_orc.c:405 Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 48 b8 00 00 00 00 00 fc ff df 41 55 41 54 49 89 d4 48 89 fa 55 48 c1 ea 03 48 89 f5 53 <48> 89 fb 48 83 ec 08 0f b6 04 02 84 c0 74 08 3c 03 0f 8e 3f 01 00 RSP: 0018:ffffc9000205f2d8 EFLAGS: 00000a02 RAX: dffffc0000000000 RBX: 0000000000000001 RCX: ffffffff91f990dc RDX: 1ffff9200040be6e RSI: ffffc9000205fda0 RDI: ffffc9000205f370 RBP: ffffc9000205fda0 R08: 0000000000000001 R09: 0000000000000007 R10: 0000000000000200 R11: 0000000000019d4e R12: 0000000000000008 R13: ffffc9000205f370 R14: ffffc9000205fdd0 R15: ffffc9000205f3a4 deref_stack_reg arch/x86/kernel/unwind_orc.c:419 [inline] unwind_next_frame+0x1551/0x2090 arch/x86/kernel/unwind_orc.c:677 arch_stack_walk+0x94/0xf0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122 save_stack+0x162/0x1e0 mm/page_owner.c:183 __reset_page_owner+0x84/0x190 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_unref_folios+0xa4a/0x1790 mm/page_alloc.c:3022 folios_put_refs+0x585/0xaa0 mm/folio.c:1034 folio_batch_release include/linux/folio_batch.h:101 [inline] shmem_undo_range+0x5e5/0x1570 mm/shmem.c:1161 shmem_truncate_range mm/shmem.c:1289 [inline] shmem_evict_inode+0x3b1/0xca0 mm/shmem.c:1420 evict+0x3c2/0xad0 fs/inode.c:822 iput_final fs/inode.c:2015 [inline] iput.part.0+0x989/0x1050 fs/inode.c:2064 iput+0x35/0x40 fs/inode.c:2030 filename_unlinkat+0x466/0x730 fs/namei.c:5723 __do_sys_unlink fs/namei.c:5754 [inline] __se_sys_unlink fs/namei.c:5751 [inline] __x64_sys_unlink+0x46/0x70 fs/namei.c:5751 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fdc0519d247 Code: 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 57 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007fff9c1684c8 EFLAGS: 00000206 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fdc0519d247 RDX: 00007fff9c1684f0 RSI: 00007fff9c168580 RDI: 00007fff9c168580 RBP: 00007fff9c168580 R08: 00007fff9c169580 R09: 00000000ffffffff R10: 0000000000000100 R11: 0000000000000206 R12: 00007fff9c169610 R13: 00007fdc05234474 R14: 0000000000078bbe R15: 00007fff9c169650 Allocated by task 4972: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5414 [inline] __kmalloc_noprof+0x32f/0x840 mm/slub.c:5439 _kmalloc_noprof include/linux/slab.h:995 [inline] tomoyo_realpath_from_path+0xb6/0x690 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x2af/0x3c0 security/tomoyo/file.c:776 tomoyo_file_open+0x6b/0x90 security/tomoyo/tomoyo.c:334 security_file_open+0xb5/0x1e0 security/security.c:2739 do_dentry_open+0x588/0x14d0 fs/open.c:973 vfs_open+0x82/0x3f0 fs/open.c:1101 do_open fs/namei.c:4837 [inline] path_openat+0x19fa/0x2440 fs/namei.c:5000 do_file_open+0x20e/0x430 fs/namei.c:5029 do_sys_openat2+0x10f/0x1e0 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 4972: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2748 [inline] slab_free mm/slub.c:6499 [inline] kfree+0x22b/0x6d0 mm/slub.c:6792 tomoyo_realpath_from_path+0x19c/0x690 security/tomoyo/realpath.c:286 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x2af/0x3c0 security/tomoyo/file.c:776 tomoyo_file_open+0x6b/0x90 security/tomoyo/tomoyo.c:334 security_file_open+0xb5/0x1e0 security/security.c:2739 do_dentry_open+0x588/0x14d0 fs/open.c:973 vfs_open+0x82/0x3f0 fs/open.c:1101 do_open fs/namei.c:4837 [inline] path_openat+0x19fa/0x2440 fs/namei.c:5000 do_file_open+0x20e/0x430 fs/namei.c:5029 do_sys_openat2+0x10f/0x1e0 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88807cf52000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 981 bytes inside of freed 4096-byte region [ffff88807cf52000, ffff88807cf53000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7cf50 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801c034140 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801c034140 dead000000000100 dead000000000122 head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000 head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4973, tgid 4973 (udevadm), ts 22516608184 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x110d/0x35d0 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2eb/0x3300 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab mm/slub.c:3462 [inline] new_slab+0xa9/0x6e0 mm/slub.c:3513 refill_objects+0xe3/0x410 mm/slub.c:7410 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __do_kmalloc_node mm/slub.c:5413 [inline] __kmalloc_noprof+0x67c/0x840 mm/slub.c:5439 _kmalloc_noprof include/linux/slab.h:995 [inline] tomoyo_realpath_from_path+0xb6/0x690 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x276/0x460 security/tomoyo/file.c:827 security_inode_getattr+0x116/0x280 security/security.c:1895 vfs_getattr fs/stat.c:259 [inline] vfs_statx_path fs/stat.c:299 [inline] vfs_statx+0x11f/0x3f0 fs/stat.c:356 vfs_fstatat+0x77/0xe0 fs/stat.c:373 __do_sys_newfstatat+0x9d/0x120 fs/stat.c:538 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 1 tgid 1 ts 18731441900 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] free_pages_prepare+0x586/0xe00 mm/page_alloc.c:1463 __free_contig_range_common+0x14f/0x250 mm/page_alloc.c:7072 debug_vm_pgtable_free_huge_page mm/debug_vm_pgtable.c:980 [inline] destroy_args+0xa8/0x7a0 mm/debug_vm_pgtable.c:993 debug_vm_pgtable+0x1d69/0x3490 mm/debug_vm_pgtable.c:1368 do_one_initcall+0x11c/0x6f0 init/main.c:1357 do_initcall_level init/main.c:1419 [inline] do_initcalls init/main.c:1435 [inline] do_basic_setup init/main.c:1455 [inline] kernel_init_freeable+0x6ea/0x7b0 init/main.c:1670 kernel_init+0x21/0x1e0 init/main.c:1560 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88807cf52280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807cf52300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807cf52380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807cf52400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807cf52480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 90 nop 1: 90 nop 2: 90 nop 3: 90 nop 4: 90 nop 5: 90 nop 6: 90 nop 7: 90 nop 8: 90 nop 9: 90 nop a: 90 nop b: 90 nop c: 90 nop d: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 14: fc ff df 17: 41 55 push %r13 19: 41 54 push %r12 1b: 49 89 d4 mov %rdx,%r12 1e: 48 89 fa mov %rdi,%rdx 21: 55 push %rbp 22: 48 c1 ea 03 shr $0x3,%rdx 26: 48 89 f5 mov %rsi,%rbp 29: 53 push %rbx * 2a: 48 89 fb mov %rdi,%rbx <-- trapping instruction 2d: 48 83 ec 08 sub $0x8,%rsp 31: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax 35: 84 c0 test %al,%al 37: 74 08 je 0x41 39: 3c 03 cmp $0x3,%al 3b: 0f .byte 0xf 3c: 8e 3f mov (%rdi),%? 3e: 01 00 add %eax,(%rax)