================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1062/0x1240 drivers/hid/hid-mcp2221.c:856 Read of size 1 at addr ffff888026067fff by task syz.5.672/9436 CPU: 0 PID: 9436 Comm: syz.5.672 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xac/0x220 mm/kasan/report.c:468 kasan_report+0x117/0x150 mm/kasan/report.c:581 mcp2221_raw_event+0x1062/0x1240 drivers/hid/hid-mcp2221.c:856 hid_input_report+0x400/0x520 drivers/hid/hid-core.c:2095 hid_irq_in+0x479/0x6d0 drivers/hid/usbhid/hid-core.c:284 __usb_hcd_giveback_urb+0x35f/0x520 drivers/usb/core/hcd.c:1650 dummy_timer+0x88a/0x3140 drivers/usb/gadget/udc/dummy_hcd.c:1993 __run_hrtimer kernel/time/hrtimer.c:1750 [inline] __hrtimer_run_queues+0x51e/0xc40 kernel/time/hrtimer.c:1814 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1831 handle_softirqs+0x280/0x820 kernel/softirq.c:578 __do_softirq kernel/softirq.c:612 [inline] invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687 RIP: 0010:finish_task_switch+0x26a/0x920 kernel/sched/core.c:5254 Code: 0f 84 37 01 00 00 48 85 db 0f 85 56 01 00 00 0f 1f 44 00 00 4c 8b 75 d0 4c 89 e7 e8 70 25 1c 09 e8 1b a3 2f 00 fb 4c 8b 65 c0 <49> 8d bc 24 f8 15 00 00 48 89 f8 48 c1 e8 03 42 0f b6 04 28 84 c0 RSP: 0018:ffffc900035779b8 EFLAGS: 00000286 RAX: e79680dc51cd3b00 RBX: 0000000000000000 RCX: e79680dc51cd3b00 RDX: dffffc0000000000 RSI: ffffffff8aaabce0 RDI: ffffffff8afc6b00 RBP: ffffc90003577a10 R08: ffffffff8e4a8d6f R09: 1ffffffff1c951ad R10: dffffc0000000000 R11: fffffbfff1c951ae R12: ffff888021951e00 R13: dffffc0000000000 R14: ffff88802b6f8000 R15: ffff8880b8e3ccc8 context_switch kernel/sched/core.c:5383 [inline] __schedule+0x14da/0x44d0 kernel/sched/core.c:6699 schedule+0xbd/0x170 kernel/sched/core.c:6773 do_nanosleep+0x1ad/0x5f0 kernel/time/hrtimer.c:2091 hrtimer_nanosleep+0x15f/0x350 kernel/time/hrtimer.c:2139 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1397 [inline] __se_sys_clock_nanosleep+0x2ea/0x370 kernel/time/posix-timers.c:1374 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f4dcbdc1f85 Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 f6 54 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 4f 55 ff ff 48 8b 04 24 48 83 c4 28 f7 d8 RSP: 002b:00007ffe435e0f50 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6 RAX: ffffffffffffffda RBX: 00007f4dcbfe5fa0 RCX: 00007f4dcbdc1f85 RDX: 00007ffe435e0f90 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f4dcbfe7da0 R08: 0000000000000000 R09: 00000000007cd5b9 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000059914 R13: 00007f4dcbfe6180 R14: ffffffffffffffff R15: 00007ffe435e10d0 Allocated by task 8658: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] fib6_net_init+0x34f/0x810 net/ipv6/ip6_fib.c:2401 ops_init+0x397/0x640 net/core/net_namespace.c:139 setup_net+0x3a5/0xa00 net/core/net_namespace.c:343 copy_net_ns+0x36d/0x5e0 net/core/net_namespace.c:520 create_new_namespaces+0x3d3/0x6f0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x11a/0x160 kernel/nsproxy.c:228 ksys_unshare+0x4c0/0x890 kernel/fork.c:3439 __do_sys_unshare kernel/fork.c:3510 [inline] __se_sys_unshare kernel/fork.c:3508 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3508 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492 kvfree_call_rcu+0xee/0x780 kernel/rcu/tree.c:3452 drop_sysctl_table+0x356/0x4b0 fs/proc/proc_sysctl.c:1515 drop_sysctl_table+0x36d/0x4b0 fs/proc/proc_sysctl.c:1518 unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1536 mpls_dev_sysctl_unregister+0x8b/0xc0 net/mpls/af_mpls.c:1431 mpls_dev_notify+0x533/0x7a0 net/mpls/af_mpls.c:1643 notifier_call_chain+0x197/0x390 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2064 [inline] call_netdevice_notifiers net/core/dev.c:2078 [inline] unregister_netdevice_many_notify+0xf36/0x1810 net/core/dev.c:11086 unregister_netdevice_many net/core/dev.c:11142 [inline] default_device_exit_batch+0x9cb/0xa60 net/core/dev.c:11620 ops_exit_list net/core/net_namespace.c:178 [inline] cleanup_net+0x77f/0xb90 net/core/net_namespace.c:652 process_one_work kernel/workqueue.c:2634 [inline] process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 The buggy address belongs to the object at ffff888026067c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 719 bytes to the right of allocated 304-byte region [ffff888026067c00, ffff888026067d30) The buggy address belongs to the physical page: page:ffffea0000981900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26064 head:ffffea0000981900 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888017841c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 2276, tgid 2276 (kworker/u4:4), ts 9331569143, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554 prep_new_page mm/page_alloc.c:1561 [inline] get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191 __alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457 alloc_slab_page+0x5d/0x170 mm/slub.c:1881 allocate_slab mm/slub.c:2028 [inline] new_slab+0x87/0x2e0 mm/slub.c:2081 ___slab_alloc+0xc6d/0x1300 mm/slub.c:3253 __slab_alloc mm/slub.c:3339 [inline] __slab_alloc_node mm/slub.c:3392 [inline] slab_alloc_node mm/slub.c:3485 [inline] __kmem_cache_alloc_node+0x1a2/0x260 mm/slub.c:3534 kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1098 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] alloc_bprm+0x56/0x9c0 fs/exec.c:1538 kernel_execve+0x98/0x9c0 fs/exec.c:2023 call_usermodehelper_exec_async+0x20b/0x350 kernel/umh.c:110 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 page_owner free stack trace missing Memory state around the buggy address: ffff888026067e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888026067f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888026067f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888026068000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888026068080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 0f 84 37 01 00 00 je 0x13d 6: 48 85 db test %rbx,%rbx 9: 0f 85 56 01 00 00 jne 0x165 f: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 14: 4c 8b 75 d0 mov -0x30(%rbp),%r14 18: 4c 89 e7 mov %r12,%rdi 1b: e8 70 25 1c 09 call 0x91c2590 20: e8 1b a3 2f 00 call 0x2fa340 25: fb sti 26: 4c 8b 65 c0 mov -0x40(%rbp),%r12 * 2a: 49 8d bc 24 f8 15 00 lea 0x15f8(%r12),%rdi <-- trapping instruction 31: 00 32: 48 89 f8 mov %rdi,%rax 35: 48 c1 e8 03 shr $0x3,%rax 39: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax 3e: 84 c0 test %al,%al