================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff888056dbffff by task swapper/0/0 CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948 __hid_input_report drivers/hid/hid-core.c:2139 [inline] hid_input_report+0x41d/0x580 drivers/hid/hid-core.c:2166 hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x376/0x540 drivers/usb/core/hcd.c:1661 dummy_timer+0x85f/0x45b0 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x52c/0xc60 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858 handle_softirqs+0x286/0x870 kernel/softirq.c:626 __do_softirq kernel/softirq.c:660 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:727 irq_exit_rcu+0x9/0x30 kernel/softirq.c:743 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1052 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:flush_smp_call_function_queue+0x1ed/0x250 kernel/smp.c:626 Code: 00 4d 85 f6 75 16 e8 a2 8f 0b 00 eb 15 e8 9b 8f 0b 00 e8 46 3a a1 09 4d 85 f6 74 ea e8 8c 8f 0b 00 fb 48 c7 04 24 0e 36 e0 45 <4b> c7 04 3c 00 00 00 00 66 43 c7 44 3c 09 00 00 43 c6 44 3c 0b 00 RSP: 0018:ffffffff8dc07ce0 EFLAGS: 00000293 RAX: ffffffff81b57904 RBX: 0000000000000000 RCX: ffffffff8dc93300 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffffff8dc07d90 R08: ffffffff8f7d7577 R09: 1ffffffff1efaeae R10: dffffc0000000000 R11: fffffbfff1efaeaf R12: 1ffffffff1b80f9c R13: 0000000000000000 R14: 0000000000000200 R15: dffffc0000000000 do_idle+0x4a2/0x510 kernel/sched/idle.c:357 cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:428 rest_init+0x2de/0x300 init/main.c:758 start_kernel+0x3ac/0x410 init/main.c:1208 x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310 x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:291 common_startup_64+0x13e/0x147 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x56dbf flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 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 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 36, tgid 36 (kworker/u8:2), ts 87330943525, free_ts 104582087106 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3920 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5214 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2479 alloc_slab_page mm/slub.c:3063 [inline] allocate_slab+0x96/0x350 mm/slub.c:3236 new_slab mm/slub.c:3290 [inline] ___slab_alloc+0xe94/0x18a0 mm/slub.c:4659 __slab_alloc+0x65/0x100 mm/slub.c:4778 __slab_alloc_node mm/slub.c:4854 [inline] slab_alloc_node mm/slub.c:5276 [inline] kmem_cache_alloc_node_noprof+0x4ce/0x710 mm/slub.c:5340 kmalloc_reserve+0xbd/0x290 net/core/skbuff.c:582 __alloc_skb+0x142/0x2d0 net/core/skbuff.c:673 alloc_skb include/linux/skbuff.h:1383 [inline] nlmsg_new include/net/netlink.h:1055 [inline] inet6_ifmcaddr_notify+0xeb/0x1d0 net/ipv6/mcast.c:909 __ipv6_dev_mc_inc+0x8a9/0xa50 net/ipv6/mcast.c:973 addrconf_join_solict net/ipv6/addrconf.c:2246 [inline] addrconf_dad_begin net/ipv6/addrconf.c:4099 [inline] addrconf_dad_work+0x3d0/0x14b0 net/ipv6/addrconf.c:4227 process_one_work+0x94a/0x15d0 kernel/workqueue.c:3267 process_scheduled_works kernel/workqueue.c:3350 [inline] worker_thread+0x9b0/0xee0 kernel/workqueue.c:3431 kthread+0x711/0x8a0 kernel/kthread.c:463 page last free pid 6062 tgid 6062 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2948 __slab_free+0x2e7/0x390 mm/slub.c:5970 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:349 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4978 [inline] slab_alloc_node mm/slub.c:5288 [inline] __do_kmalloc_node mm/slub.c:5649 [inline] __kmalloc_noprof+0x3cf/0x800 mm/slub.c:5662 kmalloc_noprof include/linux/slab.h:961 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] tomoyo_encode2 security/tomoyo/realpath.c:45 [inline] tomoyo_encode+0x28b/0x550 security/tomoyo/realpath.c:80 tomoyo_path_perm+0x2b3/0x4b0 security/tomoyo/file.c:831 tomoyo_path_symlink+0xa3/0xe0 security/tomoyo/tomoyo.c:212 security_path_symlink+0x177/0x380 security/security.c:1476 do_symlinkat+0x107/0x3f0 fs/namei.c:4841 __do_sys_symlinkat fs/namei.c:4859 [inline] __se_sys_symlinkat fs/namei.c:4856 [inline] __x64_sys_symlinkat+0x95/0xb0 fs/namei.c:4856 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888056dbfe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888056dbff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888056dbff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888056dc0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888056dc0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 00 4d 85 add %cl,-0x7b(%rbp) 3: f6 75 16 divb 0x16(%rbp) 6: e8 a2 8f 0b 00 call 0xb8fad b: eb 15 jmp 0x22 d: e8 9b 8f 0b 00 call 0xb8fad 12: e8 46 3a a1 09 call 0x9a13a5d 17: 4d 85 f6 test %r14,%r14 1a: 74 ea je 0x6 1c: e8 8c 8f 0b 00 call 0xb8fad 21: fb sti 22: 48 c7 04 24 0e 36 e0 movq $0x45e0360e,(%rsp) 29: 45 * 2a: 4b c7 04 3c 00 00 00 movq $0x0,(%r12,%r15,1) <-- trapping instruction 31: 00 32: 66 43 c7 44 3c 09 00 movw $0x0,0x9(%r12,%r15,1) 39: 00 3a: 43 c6 44 3c 0b 00 movb $0x0,0xb(%r12,%r15,1)