================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:950 Read of size 1 at addr ffff8880590abfff by task kworker/0:2/796 CPU: 0 UID: 0 PID: 796 Comm: kworker/0:2 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Workqueue: usb_hub_wq hub_event 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/0x45d0 drivers/usb/gadget/udc/dummy_hcd.c:1995 __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:lock_acquire+0x20b/0x2e0 kernel/locking/lockdep.c:5872 Code: e9 30 ff ff ff e8 85 f4 0d 0a f7 c3 00 02 00 00 0f 84 38 ff ff ff 65 48 8b 05 01 02 7b 11 48 3b 44 24 30 75 33 fb 48 83 c4 38 <5b> 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc 48 8d 3d 3e 95 73 RSP: 0018:ffffc90003e66330 EFLAGS: 00000296 RAX: 0bd7207812d7cf00 RBX: 0000000000000246 RCX: 0000000000000046 RDX: 0000000000000009 RSI: ffffffff8e16b7af RDI: ffffffff8c27d100 RBP: 0000000000000000 R08: ffffc90003e66178 R09: 0000000000000020 R10: dffffc0000000000 R11: ffffffff81a1fa10 R12: 0000000000000000 R13: ffffffff8e8984c0 R14: 0000000000000000 R15: 0000000000000001 fs_reclaim_acquire+0x98/0x100 mm/page_alloc.c:4365 might_alloc include/linux/sched/mm.h:317 [inline] slab_pre_alloc_hook mm/slub.c:4489 [inline] slab_alloc_node mm/slub.c:4843 [inline] kmem_cache_alloc_node_noprof+0x4a/0x690 mm/slub.c:4918 __alloc_skb+0x1d0/0x7d0 net/core/skbuff.c:702 alloc_skb include/linux/skbuff.h:1383 [inline] alloc_uevent_skb+0x7d/0x230 lib/kobject_uevent.c:289 uevent_net_broadcast_untagged lib/kobject_uevent.c:326 [inline] kobject_uevent_net_broadcast+0x2fa/0x560 lib/kobject_uevent.c:410 kobject_uevent_env+0x55c/0x9e0 lib/kobject_uevent.c:608 device_add+0x557/0xb70 drivers/base/core.c:3672 cdev_device_add+0x1d6/0x390 fs/char_dev.c:553 i2cdev_attach_adapter+0x2ed/0x510 drivers/i2c/i2c-dev.c:690 notifier_call_chain+0x1be/0x400 kernel/notifier.c:85 blocking_notifier_call_chain+0x6a/0x90 kernel/notifier.c:380 bus_notify+0x143/0x180 drivers/base/bus.c:1079 device_add+0x54d/0xb70 drivers/base/core.c:3671 i2c_register_adapter+0x51b/0x1180 drivers/i2c/i2c-core-base.c:1573 devm_i2c_add_adapter+0x1b/0x80 drivers/i2c/i2c-core-base.c:1845 mcp2221_probe+0x404/0x880 drivers/hid/hid-mcp2221.c:1291 __hid_device_probe drivers/hid/hid-core.c:2776 [inline] hid_device_probe+0x416/0x7a0 drivers/hid/hid-core.c:2813 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x267/0xaf0 drivers/base/dd.c:721 __driver_probe_device+0x18c/0x320 drivers/base/dd.c:863 driver_probe_device+0x4f/0x240 drivers/base/dd.c:893 __device_attach_driver+0x279/0x430 drivers/base/dd.c:1021 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500 __device_attach+0x2c5/0x450 drivers/base/dd.c:1093 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1148 bus_probe_device+0x12a/0x220 drivers/base/bus.c:613 device_add+0x7b6/0xb70 drivers/base/core.c:3691 hid_add_device+0x272/0x3e0 drivers/hid/hid-core.c:2952 usbhid_probe+0xe3a/0x12f0 drivers/hid/usbhid/hid-core.c:1450 usb_probe_interface+0x668/0xc90 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x267/0xaf0 drivers/base/dd.c:721 __driver_probe_device+0x18c/0x320 drivers/base/dd.c:863 driver_probe_device+0x4f/0x240 drivers/base/dd.c:893 __device_attach_driver+0x279/0x430 drivers/base/dd.c:1021 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500 __device_attach+0x2c5/0x450 drivers/base/dd.c:1093 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1148 bus_probe_device+0x12a/0x220 drivers/base/bus.c:613 device_add+0x7b6/0xb70 drivers/base/core.c:3691 usb_set_configuration+0x1a87/0x2110 drivers/usb/core/message.c:2266 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250 usb_probe_device+0x1c4/0x3b0 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x267/0xaf0 drivers/base/dd.c:721 __driver_probe_device+0x18c/0x320 drivers/base/dd.c:863 driver_probe_device+0x4f/0x240 drivers/base/dd.c:893 __device_attach_driver+0x279/0x430 drivers/base/dd.c:1021 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500 __device_attach+0x2c5/0x450 drivers/base/dd.c:1093 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1148 bus_probe_device+0x12a/0x220 drivers/base/bus.c:613 device_add+0x7b6/0xb70 drivers/base/core.c:3691 usb_new_device+0xa08/0x16f0 drivers/usb/core/hub.c:2695 hub_port_connect drivers/usb/core/hub.c:5567 [inline] hub_port_connect_change drivers/usb/core/hub.c:5707 [inline] port_event drivers/usb/core/hub.c:5871 [inline] hub_event+0x2a1c/0x4f30 drivers/usb/core/hub.c:5953 process_one_work kernel/workqueue.c:3276 [inline] process_scheduled_works+0xb6e/0x18c0 kernel/workqueue.c:3359 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3440 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x51e/0xb90 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:0xffffffffffffffff pfn:0x590ab flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 00000000ffffffff 0000000000000000 raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 8008, tgid 8008 (sed), ts 261361369039, free_ts 277019099556 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_slab_page mm/slub.c:3292 [inline] allocate_slab+0x77/0x660 mm/slub.c:3481 new_slab mm/slub.c:3539 [inline] refill_objects+0x331/0x3c0 mm/slub.c:7175 refill_sheaf mm/slub.c:2812 [inline] __prefill_sheaf_pfmemalloc mm/slub.c:4936 [inline] kmem_cache_prefill_sheaf+0x2e6/0x540 mm/slub.c:5025 mt_get_sheaf lib/maple_tree.c:189 [inline] mas_alloc_nodes+0x1c2/0x350 lib/maple_tree.c:1140 mas_preallocate+0x2d6/0x640 lib/maple_tree.c:5194 vma_iter_prealloc mm/vma.h:568 [inline] vma_link+0x123/0x470 mm/vma.c:1829 insert_vm_struct+0x199/0x260 mm/vma.c:3295 __install_special_mapping mm/mmap.c:1474 [inline] _install_special_mapping+0x1b0/0x350 mm/mmap.c:1510 map_vdso+0x1f6/0x470 arch/x86/entry/vdso/vma.c:168 load_elf_binary+0x1d81/0x2980 fs/binfmt_elf.c:1292 search_binary_handler fs/exec.c:1664 [inline] exec_binprm fs/exec.c:1696 [inline] bprm_execve+0x93d/0x1460 fs/exec.c:1748 do_execveat_common+0x50d/0x690 fs/exec.c:1846 __do_sys_execve fs/exec.c:1930 [inline] __se_sys_execve fs/exec.c:1924 [inline] __x64_sys_execve+0x97/0xc0 fs/exec.c:1924 page last free pid 5951 tgid 5951 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xc2b/0xdb0 mm/page_alloc.c:2978 __slab_free+0x263/0x2b0 mm/slub.c:5573 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x100 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350 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 alloc_filename fs/namei.c:142 [inline] do_getname+0x2e/0x250 fs/namei.c:182 class_filename_flags_constructor include/linux/fs.h:2541 [inline] do_readlinkat+0xc8/0x510 fs/stat.c:569 __do_sys_readlink fs/stat.c:605 [inline] __se_sys_readlink fs/stat.c:602 [inline] __x64_sys_readlink+0x7f/0x90 fs/stat.c:602 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 Memory state around the buggy address: ffff8880590abe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880590abf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8880590abf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880590ac000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880590ac080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: e9 30 ff ff ff jmp 0xffffff35 5: e8 85 f4 0d 0a call 0xa0df48f a: f7 c3 00 02 00 00 test $0x200,%ebx 10: 0f 84 38 ff ff ff je 0xffffff4e 16: 65 48 8b 05 01 02 7b mov %gs:0x117b0201(%rip),%rax # 0x117b021f 1d: 11 1e: 48 3b 44 24 30 cmp 0x30(%rsp),%rax 23: 75 33 jne 0x58 25: fb sti 26: 48 83 c4 38 add $0x38,%rsp * 2a: 5b pop %rbx <-- trapping instruction 2b: 41 5c pop %r12 2d: 41 5d pop %r13 2f: 41 5e pop %r14 31: 41 5f pop %r15 33: 5d pop %rbp 34: c3 ret 35: cc int3 36: cc int3 37: cc int3 38: cc int3 39: cc int3 3a: 48 rex.W 3b: 8d .byte 0x8d 3c: 3d .byte 0x3d 3d: 3e 95 ds xchg %eax,%ebp 3f: 73 .byte 0x73