================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:854 Read of size 1 at addr ffff88812ce13fff by task ksoftirqd/1/22 CPU: 1 UID: 0 PID: 22 Comm: ksoftirqd/1 Not tainted 6.16.0-rc4-syzkaller-00314-gb4b4dbfa96de #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:1663 usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1747 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+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 3977: 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:319 [inline] __kasan_slab_alloc+0x6e/0x70 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] kmem_cache_alloc_noprof+0x14f/0x3b0 mm/slub.c:4204 mt_alloc_one lib/maple_tree.c:176 [inline] mas_alloc_nodes+0x18b/0x8b0 lib/maple_tree.c:1249 mas_node_count_gfp+0x105/0x130 lib/maple_tree.c:1331 mas_preallocate+0x7e0/0xde0 lib/maple_tree.c:5533 vma_iter_prealloc mm/vma.h:463 [inline] __mmap_new_vma mm/vma.c:2461 [inline] __mmap_region+0x1056/0x2470 mm/vma.c:2622 mmap_region+0x1ab/0x3f0 mm/vma.c:2692 do_mmap+0xa2e/0x11f0 mm/mmap.c:561 vm_mmap_pgoff+0x201/0x390 mm/util.c:579 vm_mmap+0x8e/0xc0 mm/util.c:615 elf_map fs/binfmt_elf.c:384 [inline] elf_load+0x36d/0x780 fs/binfmt_elf.c:407 load_elf_interp fs/binfmt_elf.c:674 [inline] load_elf_binary+0x351d/0x4e40 fs/binfmt_elf.c:1239 search_binary_handler fs/exec.c:1670 [inline] exec_binprm fs/exec.c:1702 [inline] bprm_execve fs/exec.c:1754 [inline] bprm_execve+0x8c0/0x1600 fs/exec.c:1730 kernel_execve+0x2ef/0x3b0 fs/exec.c:1920 call_usermodehelper_exec_async+0x255/0x4c0 kernel/umh.c:109 ret_from_fork+0x5b3/0x6c0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 14: 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] kmem_cache_free+0x2a0/0x470 mm/slub.c:4745 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x79c/0x14e0 kernel/rcu/tree.c:2832 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 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0x8c/0xa0 mm/kasan/generic.c:548 __call_rcu_common.constprop.0+0xa5/0xa10 kernel/rcu/tree.c:3094 mas_free lib/maple_tree.c:1313 [inline] mas_replace_node lib/maple_tree.c:1752 [inline] mas_wr_node_store+0xdc8/0x1620 lib/maple_tree.c:3887 mas_wr_store_entry+0x102d/0x2550 lib/maple_tree.c:4098 mas_store_gfp+0x623/0x10b0 lib/maple_tree.c:5475 vma_iter_store_gfp mm/vma.h:217 [inline] do_brk_flags+0x7fd/0x13a0 mm/vma.c:2762 vm_brk_flags+0x387/0x5b0 mm/mmap.c:1242 elf_load+0x182/0x780 fs/binfmt_elf.c:439 load_elf_interp fs/binfmt_elf.c:674 [inline] load_elf_binary+0x351d/0x4e40 fs/binfmt_elf.c:1239 search_binary_handler fs/exec.c:1670 [inline] exec_binprm fs/exec.c:1702 [inline] bprm_execve fs/exec.c:1754 [inline] bprm_execve+0x8c0/0x1600 fs/exec.c:1730 kernel_execve+0x2ef/0x3b0 fs/exec.c:1920 call_usermodehelper_exec_async+0x255/0x4c0 kernel/umh.c:109 ret_from_fork+0x5b3/0x6c0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff88812ce13e00 which belongs to the cache maple_node of size 256 The buggy address is located 255 bytes to the right of allocated 256-byte region [ffff88812ce13e00, ffff88812ce13f00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12ce12 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff888100091000 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 0200000000000040 ffff888100091000 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 0200000000000001 ffffea0004b38481 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 17845, tgid 17845 (syz-executor), ts 3123550246805, free_ts 3084129074551 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 __kmem_cache_alloc_bulk mm/slub.c:5294 [inline] kmem_cache_alloc_bulk_noprof+0x23b/0xaa0 mm/slub.c:5366 mt_alloc_bulk lib/maple_tree.c:181 [inline] mas_dup_alloc lib/maple_tree.c:6675 [inline] mas_dup_build.constprop.0+0xc52/0x1740 lib/maple_tree.c:6739 __mt_dup+0xeb/0x1f0 lib/maple_tree.c:6803 dup_mmap+0x373/0x2050 mm/mmap.c:1749 dup_mm kernel/fork.c:1477 [inline] copy_mm kernel/fork.c:1529 [inline] copy_process+0x705c/0x7580 kernel/fork.c:2169 kernel_clone+0xfc/0x960 kernel/fork.c:2599 __do_sys_clone+0xce/0x120 kernel/fork.c:2742 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 page last free pid 2842 tgid 2842 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 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kvmalloc_node_noprof+0x228/0x5d0 mm/slub.c:5015 seq_buf_alloc fs/seq_file.c:38 [inline] seq_read_iter+0x826/0x12c0 fs/seq_file.c:210 kernfs_fop_read_iter+0x40f/0x5a0 fs/kernfs/file.c:279 new_sync_read fs/read_write.c:491 [inline] vfs_read+0x8bf/0xc60 fs/read_write.c:572 ksys_read+0x12a/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 Memory state around the buggy address: ffff88812ce13e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88812ce13f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88812ce13f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88812ce14000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812ce14080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================