================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:957 Read of size 1 at addr ffff88805d1cffff by task syz.1.68/6258 CPU: 1 UID: 0 PID: 6258 Comm: syz.1.68 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:957 __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:1657 dummy_timer+0xbc0/0x4650 drivers/usb/gadget/udc/dummy_hcd.c:2005 __run_hrtimer kernel/time/hrtimer.c:1930 [inline] __hrtimer_run_queues+0x3c0/0xa20 kernel/time/hrtimer.c:1994 hrtimer_run_softirq+0x17a/0x240 kernel/time/hrtimer.c:2011 handle_softirqs+0x22a/0x840 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x220 kernel/softirq.c:735 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1061 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:lock_acquire+0x221/0x350 kernel/locking/lockdep.c:5872 Code: ff ff ff e8 61 02 18 0a f7 44 24 08 00 02 00 00 0f 84 3a ff ff ff 65 48 8b 05 1b 4e 9f 11 48 3b 44 24 58 75 33 fb 48 83 c4 60 <5b> 41 5c 41 5d 41 5e 41 5f 5d e9 80 ee 1a 0a cc 48 8d 3d 98 a2 94 RSP: 0018:ffffc90004f67658 EFLAGS: 00000282 RAX: 400ac5c6222fee00 RBX: 0000000000000000 RCX: 0000000000000046 RDX: 000000005a44979c RSI: ffffffff8e37db44 RDI: ffffffff8c2a9260 RBP: ffffffff81776256 R08: ffffffff81776256 R09: ffffffff8e95d260 R10: ffffc90004f677b8 R11: ffffffff81b1aa30 R12: 0000000000000002 R13: ffffffff8e95d260 R14: 0000000000000000 R15: 0000000000000246 rcu_lock_acquire include/linux/rcupdate.h:312 [inline] rcu_read_lock include/linux/rcupdate.h:850 [inline] class_rcu_constructor include/linux/rcupdate.h:1193 [inline] unwind_next_frame+0xc3/0x2550 arch/x86/kernel/unwind_orc.c:495 arch_stack_walk+0x11b/0x150 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0xa9/0x100 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2689 [inline] slab_free mm/slub.c:6242 [inline] kfree+0x1c5/0x640 mm/slub.c:6557 raw_ioctl_ep_write drivers/usb/gadget/legacy/raw_gadget.c:1154 [inline] raw_ioctl+0x2536/0x41c0 drivers/usb/gadget/legacy/raw_gadget.c:1325 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6a9419c4ab Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00 RSP: 002b:00007f6a95037f60 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f6a9419c4ab RDX: 00007f6a95037fe0 RSI: 0000000040085507 RDI: 0000000000000003 RBP: 0000000000000003 R08: 00007f6a94540320 R09: 0000000000000000 R10: 0000000000000003 R11: 0000000000000246 R12: 0000200000000140 R13: 0000000000000000 R14: 00007f6a94415fa0 R15: 00007ffc53882c88 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5d1cf 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 5850, tgid 5850 (syz-executor), ts 89442909369, free_ts 100022757110 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858 prep_new_page mm/page_alloc.c:1866 [inline] get_page_from_freelist+0x24ba/0x2540 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226 alloc_slab_page mm/slub.c:3278 [inline] allocate_slab+0x77/0x660 mm/slub.c:3467 new_slab mm/slub.c:3525 [inline] refill_objects+0x339/0x3d0 mm/slub.c:7247 refill_sheaf mm/slub.c:2816 [inline] __pcs_replace_empty_main+0x321/0x720 mm/slub.c:4651 alloc_from_pcs mm/slub.c:4749 [inline] slab_alloc_node mm/slub.c:4883 [inline] kmem_cache_alloc_node_noprof+0x441/0x690 mm/slub.c:4950 kmalloc_reserve net/core/skbuff.c:613 [inline] __alloc_skb+0x27d/0x7d0 net/core/skbuff.c:713 alloc_skb include/linux/skbuff.h:1383 [inline] nlmsg_new include/net/netlink.h:1055 [inline] mpls_netconf_notify_devconf+0x46/0x100 net/mpls/af_mpls.c:1217 mpls_dev_sysctl_register+0x1dc/0x280 net/mpls/af_mpls.c:1453 mpls_add_dev net/mpls/af_mpls.c:1502 [inline] mpls_dev_notify+0x394/0xd10 net/mpls/af_mpls.c:1647 notifier_call_chain+0x1ad/0x3d0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2285 [inline] call_netdevice_notifiers net/core/dev.c:2299 [inline] register_netdevice+0x173a/0x1cf0 net/core/dev.c:11494 macvlan_common_newlink+0x127c/0x19e0 drivers/net/macvlan.c:1550 macvtap_newlink+0x13c/0x1b0 drivers/net/macvtap.c:108 rtnl_newlink_create+0x329/0xb70 net/core/rtnetlink.c:3862 page last free pid 6140 tgid 6140 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1402 [inline] __free_frozen_pages+0xbc7/0xd30 mm/page_alloc.c:2943 __slab_free+0x274/0x2c0 mm/slub.c:5605 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x99/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:4569 [inline] slab_alloc_node mm/slub.c:4898 [inline] __do_kmalloc_node mm/slub.c:5291 [inline] __kmalloc_noprof+0x316/0x760 mm/slub.c:5304 kmalloc_noprof include/linux/slab.h:954 [inline] tomoyo_realpath_from_path+0xe3/0x5d0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x283/0x560 security/tomoyo/file.c:827 security_inode_getattr+0x12b/0x310 security/security.c:1870 vfs_getattr fs/stat.c:259 [inline] vfs_fstat fs/stat.c:281 [inline] __do_sys_newfstat fs/stat.c:551 [inline] __se_sys_newfstat fs/stat.c:546 [inline] __x64_sys_newfstat+0x13b/0x270 fs/stat.c:546 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88805d1cfe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805d1cff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88805d1cff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88805d1d0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805d1d0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: ff ljmp (bad) 1: e8 61 02 18 0a call 0xa180267 6: f7 44 24 08 00 02 00 testl $0x200,0x8(%rsp) d: 00 e: 0f 84 3a ff ff ff je 0xffffff4e 14: 65 48 8b 05 1b 4e 9f mov %gs:0x119f4e1b(%rip),%rax # 0x119f4e37 1b: 11 1c: 48 3b 44 24 58 cmp 0x58(%rsp),%rax 21: 75 33 jne 0x56 23: fb sti 24: 48 83 c4 60 add $0x60,%rsp * 28: 5b pop %rbx <-- trapping instruction 29: 41 5c pop %r12 2b: 41 5d pop %r13 2d: 41 5e pop %r14 2f: 41 5f pop %r15 31: 5d pop %rbp 32: e9 80 ee 1a 0a jmp 0xa1aeeb7 37: cc int3 38: 48 rex.W 39: 8d .byte 0x8d 3a: 3d .byte 0x3d 3b: 98 cwtl 3c: a2 .byte 0xa2 3d: 94 xchg %eax,%esp