================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:854 Read of size 1 at addr ffff88811b16bfff by task ksoftirqd/0/14 CPU: 0 UID: 0 PID: 14 Comm: ksoftirqd/0 Not tainted 6.16.0-rc4-syzkaller-00311-gd1b07cc0868f #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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:408 [inline] print_report+0xcd/0x680 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:854 __hid_input_report.constprop.0+0x311/0x450 drivers/hid/hid-core.c:2117 hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x38a/0x6e0 drivers/usb/core/hcd.c:1650 usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1734 dummy_timer+0x180e/0x3a20 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+0x208/0x8d0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5b3/0x6c0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 2829: 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:377 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4328 [inline] __kmalloc_node_track_caller_noprof+0x212/0x4c0 mm/slub.c:4347 kmalloc_reserve+0xef/0x2c0 net/core/skbuff.c:601 __alloc_skb+0x166/0x380 net/core/skbuff.c:670 alloc_skb include/linux/skbuff.h:1336 [inline] alloc_skb_with_frags+0xe0/0x860 net/core/skbuff.c:6665 sock_alloc_send_pskb+0x7fb/0x990 net/core/sock.c:2999 unix_dgram_sendmsg+0x3e9/0x17a0 net/unix/af_unix.c:2083 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg net/socket.c:727 [inline] __sys_sendto+0x4a0/0x520 net/socket.c:2180 __do_sys_sendto net/socket.c:2187 [inline] __se_sys_sendto net/socket.c:2183 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2183 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 2822: 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:247 [inline] __kasan_slab_free+0x37/0x50 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kfree+0x283/0x470 mm/slub.c:4842 skb_kfree_head net/core/skbuff.c:1048 [inline] skb_free_head+0x114/0x210 net/core/skbuff.c:1060 skb_release_data+0x776/0x9c0 net/core/skbuff.c:1087 skb_release_all net/core/skbuff.c:1152 [inline] __kfree_skb net/core/skbuff.c:1166 [inline] consume_skb net/core/skbuff.c:1398 [inline] consume_skb+0xbf/0x100 net/core/skbuff.c:1392 __unix_dgram_recvmsg+0x779/0xbd0 net/unix/af_unix.c:2599 unix_dgram_recvmsg+0xd0/0x110 net/unix/af_unix.c:2616 sock_recvmsg_nosec net/socket.c:1017 [inline] sock_recvmsg+0x1f6/0x250 net/socket.c:1039 sock_read_iter+0x2b9/0x3b0 net/socket.c:1109 new_sync_read fs/read_write.c:491 [inline] vfs_read+0xa95/0xc60 fs/read_write.c:572 ksys_read+0x1f8/0x250 fs/read_write.c:715 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88811b16bc00 which belongs to the cache kmalloc-cg-512 of size 512 The buggy address is located 511 bytes to the right of allocated 512-byte region [ffff88811b16bc00, ffff88811b16be00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11b168 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88813399bb01 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff88810004b140 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000100010 00000000f5000000 ffff88813399bb01 head: 0200000000000040 ffff88810004b140 dead000000000122 0000000000000000 head: 0000000000000000 0000000000100010 00000000f5000000 ffff88813399bb01 head: 0200000000000002 ffffea00046c5a01 00000000ffffffff 00000000ffffffff head: 0000000000000000 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 2829, tgid 2829 (klogd), ts 2074789933082, free_ts 2048434126930 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0xf98/0x2ce0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x259/0x21e0 mm/page_alloc.c:4959 alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab mm/slub.c:2619 [inline] new_slab+0x23b/0x330 mm/slub.c:2673 ___slab_alloc+0xda5/0x1940 mm/slub.c:3859 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949 __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kmalloc_node_track_caller_noprof+0x15e/0x4c0 mm/slub.c:4347 kmalloc_reserve+0xef/0x2c0 net/core/skbuff.c:601 __alloc_skb+0x166/0x380 net/core/skbuff.c:670 alloc_skb include/linux/skbuff.h:1336 [inline] alloc_skb_with_frags+0xe0/0x860 net/core/skbuff.c:6665 sock_alloc_send_pskb+0x7fb/0x990 net/core/sock.c:2999 unix_dgram_sendmsg+0x3e9/0x17a0 net/unix/af_unix.c:2083 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg net/socket.c:727 [inline] __sys_sendto+0x4a0/0x520 net/socket.c:2180 __do_sys_sendto net/socket.c:2187 [inline] __se_sys_sendto net/socket.c:2183 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2183 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4b0 arch/x86/entry/syscall_64.c:94 page last free pid 23516 tgid 23516 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x78a/0x1040 mm/page_alloc.c:2706 vfree+0x1fd/0xb50 mm/vmalloc.c:3426 kcov_put kernel/kcov.c:439 [inline] kcov_put kernel/kcov.c:435 [inline] kcov_close+0x34/0x60 kernel/kcov.c:535 __fput+0x402/0xb70 fs/file_table.c:465 task_work_run+0x150/0x240 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x86c/0x2bd0 kernel/exit.c:964 do_group_exit+0xd3/0x2a0 kernel/exit.c:1105 get_signal+0x2673/0x26d0 kernel/signal.c:3034 arch_do_signal_or_restart+0x8f/0x7d0 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop+0x7c/0xe0 kernel/entry/common.c:111 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] do_syscall_64+0x3e9/0x4b0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88811b16be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88811b16bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88811b16bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88811b16c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811b16c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================