================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff888058e43fff by task syz.3.129/6492 CPU: 0 UID: 0 PID: 6492 Comm: syz.3.129 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/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:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 __hid_input_report.constprop.0+0x314/0x450 drivers/hid/hid-core.c:2130 hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x388/0x610 drivers/usb/core/hcd.c:1661 usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1745 dummy_timer+0x1814/0x3a30 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1761 [inline] __hrtimer_run_queues+0x202/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:__schedule+0x1198/0x5de0 kernel/sched/core.c:6971 Code: fa 48 c1 ea 03 80 3c 02 00 0f 85 83 43 00 00 49 89 5e 10 48 8b bd 10 ff ff ff 48 89 de e8 80 7e 96 f5 48 89 c7 e8 f8 86 f3 f5 <8b> bd 08 ff ff ff e8 ad 46 f3 f5 48 8b b5 90 fe ff ff 48 b8 00 00 RSP: 0018:ffffc90003b9f510 EFLAGS: 00000206 RAX: 000000000000a03f RBX: ffff8880740da440 RCX: ffffffff81c3831f RDX: 0000000000000000 RSI: ffffffff8de52c58 RDI: ffffffff8c163300 RBP: ffffc90003b9f6c8 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff90ab7297 R11: 0000000000000000 R12: ffff8880b843a300 R13: 0000000000000000 R14: ffff8880b843a300 R15: ffff8880740da440 __schedule_loop kernel/sched/core.c:7043 [inline] schedule+0xe7/0x3a0 kernel/sched/core.c:7058 schedule_timeout+0x257/0x290 kernel/time/sleep_timeout.c:75 unix_wait_for_peer+0x245/0x280 net/unix/af_unix.c:1639 unix_dgram_sendmsg+0x1410/0x17f0 net/unix/af_unix.c:2273 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg net/socket.c:729 [inline] ____sys_sendmsg+0xa95/0xc70 net/socket.c:2614 ___sys_sendmsg+0x134/0x1d0 net/socket.c:2668 __sys_sendmmsg+0x200/0x420 net/socket.c:2757 __do_sys_sendmmsg net/socket.c:2784 [inline] __se_sys_sendmmsg net/socket.c:2781 [inline] __x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2781 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4e0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f37a958eba9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f37aa4af038 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f37a97d5fa0 RCX: 00007f37a958eba9 RDX: 0000000000000651 RSI: 0000200000000000 RDI: 0000000000000006 RBP: 00007f37a9611e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f37a97d6038 R14: 00007f37a97d5fa0 R15: 00007ffc43bc0518 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58e43 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 5854, tgid 5854 (syz-executor), ts 69917541410, free_ts 81089155668 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2492 [inline] allocate_slab mm/slub.c:2660 [inline] new_slab+0x247/0x330 mm/slub.c:2714 ___slab_alloc+0xcf2/0x1750 mm/slub.c:3901 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3992 __slab_alloc_node mm/slub.c:4067 [inline] slab_alloc_node mm/slub.c:4228 [inline] kmem_cache_alloc_node_noprof+0xf5/0x3b0 mm/slub.c:4292 kmalloc_reserve+0x18b/0x2c0 net/core/skbuff.c:578 __alloc_skb+0x166/0x380 net/core/skbuff.c:669 alloc_skb include/linux/skbuff.h:1336 [inline] alloc_uevent_skb+0x7d/0x210 lib/kobject_uevent.c:289 uevent_net_broadcast_tagged lib/kobject_uevent.c:352 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:413 [inline] kobject_uevent_env+0x11cc/0x1870 lib/kobject_uevent.c:608 device_add+0x10dd/0x1aa0 drivers/base/core.c:3670 netdev_register_kobject+0x1a9/0x3d0 net/core/net-sysfs.c:2356 register_netdevice+0x13dc/0x2270 net/core/dev.c:11206 team_newlink+0xb4/0x190 drivers/net/team/team_core.c:2213 page last free pid 6020 tgid 6020 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7d5/0x10f0 mm/page_alloc.c:2895 discard_slab mm/slub.c:2758 [inline] __put_partials+0x165/0x1c0 mm/slub.c:3223 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:340 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4191 [inline] slab_alloc_node mm/slub.c:4240 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4247 getname_flags.part.0+0x4c/0x550 fs/namei.c:146 getname_flags+0x93/0xf0 include/linux/audit.h:322 getname include/linux/fs.h:2919 [inline] do_sys_openat2+0xb8/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1450 [inline] __do_sys_openat fs/open.c:1466 [inline] __se_sys_openat fs/open.c:1461 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1461 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4e0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888058e43e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888058e43f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888058e43f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888058e44000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888058e44080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: fa cli 1: 48 c1 ea 03 shr $0x3,%rdx 5: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) 9: 0f 85 83 43 00 00 jne 0x4392 f: 49 89 5e 10 mov %rbx,0x10(%r14) 13: 48 8b bd 10 ff ff ff mov -0xf0(%rbp),%rdi 1a: 48 89 de mov %rbx,%rsi 1d: e8 80 7e 96 f5 call 0xf5967ea2 22: 48 89 c7 mov %rax,%rdi 25: e8 f8 86 f3 f5 call 0xf5f38722 * 2a: 8b bd 08 ff ff ff mov -0xf8(%rbp),%edi <-- trapping instruction 30: e8 ad 46 f3 f5 call 0xf5f346e2 35: 48 8b b5 90 fe ff ff mov -0x170(%rbp),%rsi 3c: 48 rex.W 3d: b8 .byte 0xb8