================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x110d/0x1140 drivers/hid/hid-mcp2221.c:975 Read of size 1 at addr ffff888135bd3fff by task kworker/0:1/10556 CPU: 0 UID: 0 PID: 10556 Comm: kworker/0:1 Not tainted syzkaller #0 PREEMPT(lazy) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Workqueue: usb_hub_wq hub_event 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 mcp2221_raw_event+0x110d/0x1140 drivers/hid/hid-mcp2221.c:975 __hid_input_report.constprop.0+0x319/0x470 drivers/hid/hid-core.c:2175 hid_irq_in+0x55d/0x710 drivers/hid/usbhid/hid-core.c:287 __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+0x1d9/0x9b0 kernel/softirq.c:645 __do_softirq kernel/softirq.c:679 [inline] invoke_softirq kernel/softirq.c:519 [inline] __irq_exit_rcu+0x168/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+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:211 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:221 Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 56 e7 05 fa 48 89 df e8 de 3d 06 fa f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 65 93 f8 f9 65 48 83 3d d4 fe 98 05 00 74 16 5b RSP: 0018:ffffc90013f1e908 EFLAGS: 00000246 RAX: 0000000000000002 RBX: ffff8881032e91a0 RCX: 0000000000000040 RDX: 0000000000000001 RSI: ffffffff89329f40 RDI: ffffffff87d2b780 RBP: 0000000000000246 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: ffff888107f3a2a0 R13: ffffc90013f1e9a0 R14: 0000000000000000 R15: ffff8881032e91a0 spin_unlock_irqrestore include/linux/spinlock.h:425 [inline] klist_next+0x26c/0x510 lib/klist.c:401 next_driver drivers/base/bus.c:457 [inline] bus_for_each_drv+0x107/0x1e0 drivers/base/bus.c:499 i2c_register_adapter+0x95c/0x13f0 drivers/i2c/i2c-core-base.c:1638 i2c_add_adapter drivers/i2c/i2c-core-base.c:1691 [inline] devm_i2c_add_adapter+0x89/0x120 drivers/i2c/i2c-core-base.c:1878 mcp2221_probe.cold+0x60e/0xf16 drivers/hid/hid-mcp2221.c:1319 __hid_device_probe drivers/hid/hid-core.c:2839 [inline] hid_device_probe+0x4fe/0x850 drivers/hid/hid-core.c:2878 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x210/0x460 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3776 hid_add_device+0x2bf/0x440 drivers/hid/hid-core.c:3065 usbhid_probe+0xa64/0x10b0 drivers/hid/usbhid/hid-core.c:1452 usb_probe_interface+0x386/0x9b0 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x210/0x460 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3776 usb_set_configuration+0xd97/0x1c60 drivers/usb/core/message.c:2268 usb_generic_driver_probe+0xa1/0xe0 drivers/usb/core/generic.c:250 usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x210/0x460 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3776 usb_new_device.part.0+0xcc2/0x1686 drivers/usb/core/hub.c:2708 usb_new_device drivers/usb/core/hub.c:5833 [inline] hub_port_connect drivers/usb/core/hub.c:5580 [inline] hub_port_connect_change drivers/usb/core/hub.c:5720 [inline] port_event drivers/usb/core/hub.c:5884 [inline] hub_event.cold+0x51a/0xe9d drivers/usb/core/hub.c:5966 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 process_scheduled_works kernel/workqueue.c:3479 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x69f/0xc90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888135bd3210 pfn:0x135bd3 flags: 0x200000000000000(node=0|zone=2) raw: 0200000000000000 dead000000000100 dead000000000122 0000000000000000 raw: ffff888135bd3210 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3052, tgid 3052 (modprobe), ts 51826337252 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+0xf4b/0x3440 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2d7/0x2f70 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] kmem_cache_alloc_noprof+0x471/0x650 mm/slub.c:5010 anon_vma_alloc mm/rmap.c:94 [inline] __anon_vma_prepare+0x340/0x5e0 mm/rmap.c:201 __vmf_anon_prepare+0x11f/0x250 mm/memory.c:3961 vmf_anon_prepare mm/internal.h:569 [inline] do_anonymous_page mm/memory.c:5478 [inline] do_pte_missing mm/memory.c:4698 [inline] handle_pte_fault mm/memory.c:6558 [inline] __handle_mm_fault+0x204a/0x3690 mm/memory.c:6707 handle_mm_fault+0x363/0xa20 mm/memory.c:6876 do_user_addr_fault+0x5a7/0x11d0 arch/x86/mm/fault.c:1343 handle_page_fault arch/x86/mm/fault.c:1483 [inline] exc_page_fault+0x66/0xc0 arch/x86/mm/fault.c:1536 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595 page last free pid 14 tgid 14 ts 131300744664 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0x714/0xfc0 mm/page_alloc.c:2962 rcu_do_batch kernel/rcu/tree.c:2650 [inline] rcu_core+0x5f0/0x1260 kernel/rcu/tree.c:2919 handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645 run_ksoftirqd kernel/softirq.c:1099 [inline] run_ksoftirqd+0x38/0x60 kernel/softirq.c:1091 smpboot_thread_fn+0x3d3/0xab0 kernel/smpboot.c:160 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x69f/0xc90 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: ffff888135bd3e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888135bd3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888135bd3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888135bd4000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888135bd4080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: f5 cmc 1: 53 push %rbx 2: 48 8b 74 24 10 mov 0x10(%rsp),%rsi 7: 48 89 fb mov %rdi,%rbx a: 48 83 c7 18 add $0x18,%rdi e: e8 56 e7 05 fa call 0xfa05e769 13: 48 89 df mov %rbx,%rdi 16: e8 de 3d 06 fa call 0xfa063df9 1b: f7 c5 00 02 00 00 test $0x200,%ebp 21: 75 23 jne 0x46 23: 9c pushf 24: 58 pop %rax 25: f6 c4 02 test $0x2,%ah 28: 75 37 jne 0x61 * 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction 2f: e8 65 93 f8 f9 call 0xf9f89399 34: 65 48 83 3d d4 fe 98 cmpq $0x0,%gs:0x598fed4(%rip) # 0x598ff11 3b: 05 00 3d: 74 16 je 0x55 3f: 5b pop %rbx