================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:854 Read of size 1 at addr ffff888057677fff by task udevd/5186 CPU: 1 UID: 0 PID: 5186 Comm: udevd Not tainted 6.16.0-rc4-syzkaller-00013-g66701750d556 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xcd/0x680 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:854 __hid_input_report.constprop.0+0x311/0x450 drivers/hid/hid-core.c:2117 hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x38d/0x6e0 drivers/usb/core/hcd.c:1650 usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1734 dummy_timer+0x180e/0x3a20 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1761 [inline] __hrtimer_run_queues+0x1ff/0xad0 kernel/time/hrtimer.c:1825 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1842 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:680 irq_exit_rcu+0x9/0x30 kernel/softirq.c:696 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:27 [inline] RIP: 0010:check_kcov_mode kernel/kcov.c:183 [inline] RIP: 0010:write_comp_data+0x11/0x90 kernel/kcov.c:246 Code: c7 09 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 49 89 d2 49 89 f8 49 89 f1 65 48 8b 15 e7 c5 10 12 <65> 8b 05 f8 c5 10 12 a9 00 01 ff 00 74 1d f6 c4 01 74 67 a9 00 00 RSP: 0018:ffffc90003bdfdf8 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 0000000000000009 RCX: ffffffff894faec4 RDX: ffff88807b36a440 RSI: 0000000000000000 RDI: 0000000000000005 RBP: 1ffff9200077bfc2 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000040 R11: 0000000000000000 R12: 0000000000000040 R13: 000000000000002f R14: 0000000000000001 R15: ffffc90003bdfe40 __sys_recvmsg+0xb4/0x220 net/socket.c:2850 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff764aa7407 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:00007ffd8e966370 EFLAGS: 00000202 ORIG_RAX: 000000000000002f RAX: ffffffffffffffda RBX: 00007ff7649b9880 RCX: 00007ff764aa7407 RDX: 0000000000000040 RSI: 00007ffd8e966490 RDI: 0000000000000009 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000 R13: 000055925e55f100 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x57677 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 1022, tgid 1022 (kworker/u8:5), ts 63146323610, free_ts 82358735286 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab mm/slub.c:2619 [inline] new_slab+0x23b/0x330 mm/slub.c:2673 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3859 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949 __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] kmem_cache_alloc_node_noprof+0xf5/0x3b0 mm/slub.c:4249 kmalloc_reserve+0x18b/0x2c0 net/core/skbuff.c:579 __alloc_skb+0x166/0x380 net/core/skbuff.c:670 alloc_skb include/linux/skbuff.h:1336 [inline] nlmsg_new include/net/netlink.h:1041 [inline] inet6_ifmcaddr_notify+0xd6/0x1d0 net/ipv6/mcast.c:922 __ipv6_dev_mc_inc+0x733/0xc10 net/ipv6/mcast.c:989 addrconf_join_solict net/ipv6/addrconf.c:2242 [inline] addrconf_dad_begin net/ipv6/addrconf.c:4103 [inline] addrconf_dad_work+0x284/0x14e0 net/ipv6/addrconf.c:4231 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402 kthread+0x3c2/0x780 kernel/kthread.c:464 page last free pid 6057 tgid 6057 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4204 new_handle fs/jbd2/transaction.c:457 [inline] jbd2__journal_start+0x193/0x6a0 fs/jbd2/transaction.c:484 __ext4_journal_start_sb+0x195/0x690 fs/ext4/ext4_jbd2.c:115 __ext4_journal_start fs/ext4/ext4_jbd2.h:242 [inline] ext4_dirty_inode+0xa1/0x130 fs/ext4/inode.c:6456 __mark_inode_dirty+0x1eb/0xe50 fs/fs-writeback.c:2527 generic_update_time+0xcf/0xf0 fs/inode.c:2064 inode_update_time fs/inode.c:2077 [inline] __file_update_time fs/inode.c:2305 [inline] file_update_time+0x17d/0x1c0 fs/inode.c:2335 ext4_page_mkwrite+0x35e/0x1760 fs/ext4/inode.c:6577 do_page_mkwrite+0x171/0x380 mm/memory.c:3378 do_shared_fault mm/memory.c:5666 [inline] do_fault mm/memory.c:5728 [inline] do_pte_missing mm/memory.c:4251 [inline] handle_pte_fault mm/memory.c:6069 [inline] __handle_mm_fault+0x3829/0x5490 mm/memory.c:6212 handle_mm_fault+0x589/0xd10 mm/memory.c:6381 do_user_addr_fault+0x60c/0x1370 arch/x86/mm/fault.c:1336 Memory state around the buggy address: ffff888057677e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888057677f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888057677f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888057678000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888057678080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 7: 90 nop 8: 90 nop 9: 90 nop a: 90 nop b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 49 89 d2 mov %rdx,%r10 1a: 49 89 f8 mov %rdi,%r8 1d: 49 89 f1 mov %rsi,%r9 20: 65 48 8b 15 e7 c5 10 mov %gs:0x1210c5e7(%rip),%rdx # 0x1210c60f 27: 12 * 28: 65 8b 05 f8 c5 10 12 mov %gs:0x1210c5f8(%rip),%eax # 0x1210c627 <-- trapping instruction 2f: a9 00 01 ff 00 test $0xff0100,%eax 34: 74 1d je 0x53 36: f6 c4 01 test $0x1,%ah 39: 74 67 je 0xa2 3b: a9 .byte 0xa9