================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:950 Read of size 1 at addr ffff88807704bfff by task syz.1.2195/14417 CPU: 0 UID: 0 PID: 14417 Comm: syz.1.2195 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 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:stack_trace_save+0x39/0x100 kernel/stacktrace.c:114 Code: 48 81 ec 80 00 00 00 65 48 8b 05 22 c0 6b 11 48 89 44 24 78 48 8d 44 24 20 48 c7 04 24 b3 8a b5 41 48 c7 44 24 08 69 09 eb 8d <48> c7 44 24 10 e0 cf b0 81 48 89 e3 48 c1 eb 03 48 b9 f1 f1 f1 f1 RSP: 0018:ffffc90004357800 EFLAGS: 00000286 RAX: ffffc90004357820 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffffc900043578b0 RBP: ffffc900043578a0 R08: dffffc0000000000 R09: 0000000000000000 R10: ffffc900043578b0 R11: fffffbfff20239f7 R12: ffff8880287e2e80 R13: 0000000000000000 R14: ffff8880287e2e88 R15: ffffc900043578b0 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:2685 [inline] slab_free mm/slub.c:6165 [inline] kfree+0x1c1/0x630 mm/slub.c:6483 raw_ioctl_event_fetch drivers/usb/gadget/legacy/raw_gadget.c:-1 [inline] raw_ioctl+0x2365/0x41c0 drivers/usb/gadget/legacy/raw_gadget.c:1310 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+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f34efb9c4ab 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:00007f34f0b1df00 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00007f34efb9c4ab RDX: 00007f34f0b1efd0 RSI: 0000000080085502 RDI: 0000000000000006 RBP: 00007f34f0b1efd0 R08: 00007f34efa64567 R09: 00007f34f0b1dfc8 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000080085502 R13: 0000000800000000 R14: 0000000000000004 R15: 00007f34efc50ede The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x7704b 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 9582, tgid 9578 (iou-sqp-9581), ts 437865824189, free_ts 455468624300 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] __pcs_replace_empty_main+0x2e6/0x730 mm/slub.c:4615 alloc_from_pcs mm/slub.c:4717 [inline] slab_alloc_node mm/slub.c:4851 [inline] __do_kmalloc_node mm/slub.c:5259 [inline] __kmalloc_noprof+0x474/0x760 mm/slub.c:5272 kmalloc_noprof include/linux/slab.h:954 [inline] io_cache_alloc_new+0x40/0x100 io_uring/alloc_cache.c:40 io_cache_alloc io_uring/alloc_cache.h:61 [inline] io_uring_alloc_async_data io_uring/io_uring.h:341 [inline] io_rw_alloc_async io_uring/rw.c:209 [inline] __io_prep_rw+0x2bd/0xed0 io_uring/rw.c:268 io_prep_rw io_uring/rw.c:328 [inline] io_prep_rwv+0x8e/0x440 io_uring/rw.c:350 io_init_req io_uring/io_uring.c:1828 [inline] io_submit_sqe io_uring/io_uring.c:1875 [inline] io_submit_sqes+0xb6d/0x2400 io_uring/io_uring.c:2043 __io_sq_thread io_uring/sqpoll.c:233 [inline] io_sq_thread+0xd36/0x2150 io_uring/sqpoll.c:345 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page last free pid 5193 tgid 5193 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] __do_kmalloc_node mm/slub.c:5259 [inline] __kmalloc_noprof+0x316/0x760 mm/slub.c:5272 kmalloc_noprof include/linux/slab.h:954 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] tomoyo_encode2 security/tomoyo/realpath.c:45 [inline] tomoyo_encode+0x28b/0x550 security/tomoyo/realpath.c:80 tomoyo_realpath_from_path+0x58d/0x5d0 security/tomoyo/realpath.c:283 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x229/0x470 security/tomoyo/file.c:776 security_file_open+0xa9/0x240 security/security.c:2637 do_dentry_open+0x384/0x14e0 fs/open.c:926 vfs_open+0x3b/0x340 fs/open.c:1081 do_open fs/namei.c:4677 [inline] path_openat+0x2e08/0x3860 fs/namei.c:4836 do_file_open+0x23e/0x4a0 fs/namei.c:4865 do_sys_openat2+0x113/0x200 fs/open.c:1366 do_sys_open fs/open.c:1372 [inline] __do_sys_openat fs/open.c:1388 [inline] __se_sys_openat fs/open.c:1383 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1383 Memory state around the buggy address: ffff88807704be80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88807704bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88807704bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88807704c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807704c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 48 81 ec 80 00 00 00 sub $0x80,%rsp 7: 65 48 8b 05 22 c0 6b mov %gs:0x116bc022(%rip),%rax # 0x116bc031 e: 11 f: 48 89 44 24 78 mov %rax,0x78(%rsp) 14: 48 8d 44 24 20 lea 0x20(%rsp),%rax 19: 48 c7 04 24 b3 8a b5 movq $0x41b58ab3,(%rsp) 20: 41 21: 48 c7 44 24 08 69 09 movq $0xffffffff8deb0969,0x8(%rsp) 28: eb 8d * 2a: 48 c7 44 24 10 e0 cf movq $0xffffffff81b0cfe0,0x10(%rsp) <-- trapping instruction 31: b0 81 33: 48 89 e3 mov %rsp,%rbx 36: 48 c1 eb 03 shr $0x3,%rbx 3a: 48 rex.W 3b: b9 f1 f1 f1 f1 mov $0xf1f1f1f1,%ecx