================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff888056737fff by task udevd/6874 CPU: 1 UID: 0 PID: 6874 Comm: udevd Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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+0x311/0x450 drivers/hid/hid-core.c:2130 hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x38b/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+0x1ff/0xad0 kernel/time/hrtimer.c:1825 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1842 handle_softirqs+0x216/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:lock_acquire+0x79/0x350 kernel/locking/lockdep.c:5872 Code: 82 74 02 00 00 8b 35 da ba 13 0f 85 f6 0f 85 8d 00 00 00 48 8b 44 24 30 65 48 2b 05 79 b6 3e 12 0f 85 c7 02 00 00 48 83 c4 38 <5b> 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc 65 8b 05 85 b6 3e 12 RSP: 0018:ffffc9001aa1f2e8 EFLAGS: 00000286 RAX: 0000000000000000 RBX: ffffffff8e5c1260 RCX: 00000000e7285d86 RDX: 0000000000000000 RSI: ffffffff8de2b530 RDI: ffffffff8c162a00 RBP: 0000000000000002 R08: 0a6098d23070634a R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:331 [inline] rcu_read_lock include/linux/rcupdate.h:841 [inline] class_rcu_constructor include/linux/rcupdate.h:1155 [inline] unwind_next_frame+0xd1/0x20a0 arch/x86/kernel/unwind_orc.c:479 arch_stack_walk+0x94/0x100 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:405 kmalloc_noprof include/linux/slab.h:905 [inline] inode_doinit_use_xattr+0x54/0x410 security/selinux/hooks.c:1366 inode_doinit_with_dentry+0x10c8/0x12e0 security/selinux/hooks.c:1560 selinux_d_instantiate+0x26/0x30 security/selinux/hooks.c:6519 security_d_instantiate+0x142/0x1a0 security/security.c:4109 d_splice_alias_ops+0x92/0x840 fs/dcache.c:2998 kernfs_iop_lookup+0x23f/0x2d0 fs/kernfs/dir.c:1251 __lookup_slow+0x251/0x460 fs/namei.c:1808 lookup_slow fs/namei.c:1825 [inline] walk_component+0x353/0x5b0 fs/namei.c:2129 lookup_last fs/namei.c:2630 [inline] path_lookupat+0x142/0x6d0 fs/namei.c:2654 filename_lookup+0x224/0x5f0 fs/namei.c:2683 vfs_statx+0x101/0x3f0 fs/stat.c:353 vfs_fstatat+0x7b/0xf0 fs/stat.c:375 __do_sys_newfstatat+0x97/0x120 fs/stat.c:542 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f14f8b11b0a Code: 48 8b 15 f1 f2 0d 00 f7 d8 64 89 02 b8 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 41 89 ca b8 06 01 00 00 0f 05 <3d> 00 f0 ff ff 77 07 31 c0 c3 0f 1f 40 00 48 8b 15 b9 f2 0d 00 f7 RSP: 002b:00007ffe2a260ef8 EFLAGS: 00000246 ORIG_RAX: 0000000000000106 RAX: ffffffffffffffda RBX: 00007ffe2a261390 RCX: 00007f14f8b11b0a RDX: 00007ffe2a260f00 RSI: 00007ffe2a261390 RDI: 00000000ffffff9c RBP: 0000559936dce2c0 R08: 0000000000000000 R09: 0000000000000020 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe2a260f90 R13: 00007ffe2a2617c5 R14: 000055990e55aca4 R15: 000055990e55abcc Allocated by task 5856: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:330 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:356 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_node_noprof+0x1d5/0x3b0 mm/slub.c:4281 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] netlink_alloc_large_skb+0x69/0x130 net/netlink/af_netlink.c:1186 netlink_sendmsg+0x6a1/0xdd0 net/netlink/af_netlink.c:1871 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg net/socket.c:729 [inline] ____sys_sendmsg+0xa98/0xc70 net/socket.c:2614 ___sys_sendmsg+0x134/0x1d0 net/socket.c:2668 __sys_sendmsg+0x16d/0x220 net/socket.c:2700 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5856: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x60/0x70 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x2d1/0x4d0 mm/slub.c:4782 skb_kfree_head net/core/skbuff.c:1045 [inline] skb_kfree_head net/core/skbuff.c:1042 [inline] skb_free_head+0x1b7/0x210 net/core/skbuff.c:1059 skb_release_data+0x795/0x9e0 net/core/skbuff.c:1086 skb_release_all net/core/skbuff.c:1151 [inline] __kfree_skb net/core/skbuff.c:1165 [inline] consume_skb net/core/skbuff.c:1397 [inline] consume_skb+0xbf/0x100 net/core/skbuff.c:1391 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0x5b2/0x870 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x8d1/0xdd0 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg net/socket.c:729 [inline] ____sys_sendmsg+0xa98/0xc70 net/socket.c:2614 ___sys_sendmsg+0x134/0x1d0 net/socket.c:2668 __sys_sendmsg+0x16d/0x220 net/socket.c:2700 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888056737a80 which belongs to the cache skbuff_small_head of size 704 The buggy address is located 703 bytes to the right of allocated 704-byte region [ffff888056737a80, ffff888056737d40) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x56734 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff888140aa4c80 ffffea0001598800 dead000000000002 raw: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff888140aa4c80 ffffea0001598800 dead000000000002 head: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea000159cd01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 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 5845, tgid 5845 (syz-executor), ts 69821561442, free_ts 17240832487 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:2487 [inline] allocate_slab mm/slub.c:2655 [inline] new_slab+0x247/0x330 mm/slub.c:2709 ___slab_alloc+0xcf2/0x1740 mm/slub.c:3891 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3981 __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_node_noprof+0xf5/0x3b0 mm/slub.c:4281 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] nlmsg_new include/net/netlink.h:1055 [inline] rtmsg_ifa+0x16a/0x2a0 net/ipv4/devinet.c:2015 __inet_insert_ifa+0x911/0xcd0 net/ipv4/devinet.c:566 inet_rtm_newaddr+0xd87/0x1540 net/ipv4/devinet.c:1002 rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:6946 netlink_rcv_skb+0x155/0x420 net/netlink/af_netlink.c:2552 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x5aa/0x870 net/netlink/af_netlink.c:1346 page last free pid 1 tgid 1 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 __free_pages mm/page_alloc.c:5260 [inline] free_contig_range+0x183/0x4b0 mm/page_alloc.c:7091 destroy_args+0x794/0xc10 mm/debug_vm_pgtable.c:958 debug_vm_pgtable+0x1a32/0x3640 mm/debug_vm_pgtable.c:1345 do_one_initcall+0x120/0x6e0 init/main.c:1269 do_initcall_level init/main.c:1331 [inline] do_initcalls init/main.c:1347 [inline] do_basic_setup init/main.c:1366 [inline] kernel_init_freeable+0x5c2/0x910 init/main.c:1579 kernel_init+0x1c/0x2b0 init/main.c:1469 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888056737e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888056737f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888056737f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888056738000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888056738080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess), 1 bytes skipped: 0: 74 02 je 0x4 2: 00 00 add %al,(%rax) 4: 8b 35 da ba 13 0f mov 0xf13bada(%rip),%esi # 0xf13bae4 a: 85 f6 test %esi,%esi c: 0f 85 8d 00 00 00 jne 0x9f 12: 48 8b 44 24 30 mov 0x30(%rsp),%rax 17: 65 48 2b 05 79 b6 3e sub %gs:0x123eb679(%rip),%rax # 0x123eb698 1e: 12 1f: 0f 85 c7 02 00 00 jne 0x2ec 25: 48 83 c4 38 add $0x38,%rsp * 29: 5b pop %rbx <-- trapping instruction 2a: 5d pop %rbp 2b: 41 5c pop %r12 2d: 41 5d pop %r13 2f: 41 5e pop %r14 31: 41 5f pop %r15 33: c3 ret 34: cc int3 35: cc int3 36: cc int3 37: cc int3 38: 65 8b 05 85 b6 3e 12 mov %gs:0x123eb685(%rip),%eax # 0x123eb6c4