================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:950 Read of size 1 at addr ffff888060a6bfff by task udevd/5192 CPU: 0 UID: 0 PID: 5192 Comm: udevd Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:950 __hid_input_report drivers/hid/hid-core.c:2140 [inline] hid_input_report+0x41d/0x580 drivers/hid/hid-core.c:2167 hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x376/0x540 drivers/usb/core/hcd.c:1657 dummy_timer+0xbbd/0x4650 drivers/usb/gadget/udc/dummy_hcd.c:2005 __run_hrtimer kernel/time/hrtimer.c:1785 [inline] __hrtimer_run_queues+0x53a/0xcc0 kernel/time/hrtimer.c:1849 hrtimer_run_softirq+0x182/0x5a0 kernel/time/hrtimer.c:1866 handle_softirqs+0x22a/0x870 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x5f/0x150 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:filter_irq_stacks+0x32/0xa0 kernel/stacktrace.c:397 Code: 41 55 41 54 53 85 f6 74 70 49 89 fe 41 89 f4 31 db 49 bd 00 00 00 00 00 fc ff df 49 89 ff 4c 89 f8 48 c1 e8 03 42 80 3c 28 00 <74> 08 4c 89 ff e8 84 26 7f 00 49 8b 04 de 48 3d 30 02 00 81 0f 93 RSP: 0018:ffffc9000461f238 EFLAGS: 00000246 RAX: 1ffff920008c3e59 RBX: 0000000000000001 RCX: 0000000000000001 RDX: 0000000000000d00 RSI: 0000000000000012 RDI: ffffc9000461f2c0 RBP: ffffc9000461f4e8 R08: ffffffff81d572c6 R09: ffffffff8e75e5e0 R10: ffffc9000461f1d8 R11: ffffffff81b0e0f0 R12: 0000000000000012 R13: dffffc0000000000 R14: ffffc9000461f2c0 R15: ffffc9000461f2c8 stack_depot_save_flags+0x33/0x810 lib/stackdepot.c:667 kasan_save_stack mm/kasan/common.c:58 [inline] kasan_save_track+0x4f/0x80 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4538 [inline] slab_alloc_node mm/slub.c:4866 [inline] kmem_cache_alloc_noprof+0x2bc/0x650 mm/slub.c:4873 lsm_inode_alloc security/security.c:229 [inline] security_inode_alloc+0x39/0x310 security/security.c:1190 inode_init_always_gfp+0x9ed/0xdc0 fs/inode.c:307 inode_init_always include/linux/fs.h:2922 [inline] alloc_inode+0x82/0x1b0 fs/inode.c:354 iget_locked+0x131/0x6a0 fs/inode.c:1480 kernfs_get_inode+0x4f/0x780 fs/kernfs/inode.c:253 kernfs_iop_lookup+0x1fe/0x320 fs/kernfs/dir.c:1241 __lookup_slow+0x2b7/0x410 fs/namei.c:1916 lookup_slow+0x53/0x70 fs/namei.c:1933 walk_component fs/namei.c:2279 [inline] link_path_walk+0xd1e/0x18d0 fs/namei.c:2653 path_openat+0x2c3/0x3860 fs/namei.c:4832 do_file_open+0x23e/0x4a0 fs/namei.c:4865 do_sys_openat2+0x113/0x200 fs/open.c:1366 do_sys_open fs/open.c:1372 [inline] __do_sys_openat fs/open.c:1388 [inline] __se_sys_openat fs/open.c:1383 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1383 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff2478a7407 Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007ffd4db56fb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007ff247f87880 RCX: 00007ff2478a7407 RDX: 0000000000080000 RSI: 00007ffd4db57130 RDI: ffffffffffffff9c RBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 000055af361387f5 R13: 000055af361387f5 R14: 0000000000000001 R15: 0000000000000000 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x5a0 pfn:0x60a6b flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000 raw: 00000000000005a0 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 0x140cc2(GFP_HIGHUSER|__GFP_COMP), pid 14112, tgid 14107 (syz.7.3071), ts 334993029481, free_ts 335583308516 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2490 folio_alloc_mpol_noprof+0x39/0x70 mm/mempolicy.c:2509 shmem_alloc_folio mm/shmem.c:1930 [inline] shmem_alloc_and_add_folio+0x445/0xf80 mm/shmem.c:1972 shmem_get_folio_gfp+0x5a9/0x1670 mm/shmem.c:2567 shmem_read_folio_gfp+0x8a/0xe0 mm/shmem.c:5989 memfd_pin_folios+0xb3a/0x1000 mm/gup.c:3512 udmabuf_pin_folios drivers/dma-buf/udmabuf.c:335 [inline] udmabuf_create+0x7a1/0xfd0 drivers/dma-buf/udmabuf.c:432 udmabuf_ioctl_create drivers/dma-buf/udmabuf.c:484 [inline] udmabuf_ioctl+0x1f3/0x300 drivers/dma-buf/udmabuf.c:515 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:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 14107 tgid 14107 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] free_unref_folios+0xed5/0x16d0 mm/page_alloc.c:3040 folios_put_refs+0x789/0x8d0 mm/swap.c:1002 folio_batch_release include/linux/pagevec.h:101 [inline] shmem_undo_range+0x52c/0x1660 mm/shmem.c:1149 shmem_truncate_range mm/shmem.c:1277 [inline] shmem_evict_inode+0x240/0x9e0 mm/shmem.c:1407 evict+0x61e/0xb10 fs/inode.c:846 __dentry_kill+0x1a2/0x5e0 fs/dcache.c:670 finish_dput+0xc9/0x480 fs/dcache.c:879 __fput+0x691/0xa70 fs/file_table.c:477 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:67 [inline] exit_to_user_mode_loop+0xed/0x480 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline] do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888060a6be80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888060a6bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888060a6bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888060a6c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888060a6c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 41 55 push %r13 2: 41 54 push %r12 4: 53 push %rbx 5: 85 f6 test %esi,%esi 7: 74 70 je 0x79 9: 49 89 fe mov %rdi,%r14 c: 41 89 f4 mov %esi,%r12d f: 31 db xor %ebx,%ebx 11: 49 bd 00 00 00 00 00 movabs $0xdffffc0000000000,%r13 18: fc ff df 1b: 49 89 ff mov %rdi,%r15 1e: 4c 89 f8 mov %r15,%rax 21: 48 c1 e8 03 shr $0x3,%rax 25: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1) * 2a: 74 08 je 0x34 <-- trapping instruction 2c: 4c 89 ff mov %r15,%rdi 2f: e8 84 26 7f 00 call 0x7f26b8 34: 49 8b 04 de mov (%r14,%rbx,8),%rax 38: 48 3d 30 02 00 81 cmp $0xffffffff81000230,%rax 3e: 0f .byte 0xf 3f: 93 xchg %eax,%ebx