================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:852 Read of size 1 at addr ffff888024fbffff by task dhcpcd/5487 CPU: 1 UID: 0 PID: 5487 Comm: dhcpcd Not tainted 6.15.0-rc5-syzkaller-00300-g3ce9925823c7 #0 PREEMPT(full) 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+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:852 __hid_input_report.constprop.0+0x314/0x450 drivers/hid/hid-core.c:2117 hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x38d/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:1994 __run_hrtimer kernel/time/hrtimer.c:1761 [inline] __hrtimer_run_queues+0x202/0xad0 kernel/time/hrtimer.c:1825 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1842 handle_softirqs+0x219/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:1049 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:finish_task_switch.isra.0+0x22a/0xc10 kernel/sched/core.c:5250 Code: fb 09 00 00 44 8b 05 29 d8 fb 0e 45 85 c0 0f 85 be 01 00 00 4c 89 e7 e8 a4 f6 ff ff e8 7f 78 39 00 fb 65 48 8b 1d 8e 42 1a 12 <48> 8d bb 18 16 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 RSP: 0018:ffffc90002ee7568 EFLAGS: 00000206 RAX: 0000000000128839 RBX: ffff888030649e00 RCX: 0000000000000007 RDX: 0000000000000000 RSI: ffffffff8dbdd537 RDI: ffffffff8bf46fa0 RBP: ffffc90002ee75b0 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff90851617 R11: 0000000000000000 R12: ffff8880b8539f00 R13: ffff8880350f1e00 R14: 0000000000000001 R15: ffff8880b853ad30 context_switch kernel/sched/core.c:5385 [inline] __schedule+0x1177/0x5de0 kernel/sched/core.c:6767 __schedule_loop kernel/sched/core.c:6845 [inline] schedule+0xe7/0x3a0 kernel/sched/core.c:6860 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6917 rwsem_down_read_slowpath+0x62f/0xb60 kernel/locking/rwsem.c:1084 __down_read_common kernel/locking/rwsem.c:1248 [inline] __down_read kernel/locking/rwsem.c:1261 [inline] down_read+0xef/0x480 kernel/locking/rwsem.c:1526 kernfs_dop_revalidate+0xa5/0x740 fs/kernfs/dir.c:1178 d_revalidate fs/namei.c:929 [inline] d_revalidate fs/namei.c:925 [inline] lookup_fast+0x266/0x610 fs/namei.c:1778 walk_component+0x5b/0x5b0 fs/namei.c:2134 link_path_walk.part.0.constprop.0+0x685/0xd60 fs/namei.c:2503 link_path_walk fs/namei.c:2435 [inline] path_openat+0x227/0x2d40 fs/namei.c:4035 do_filp_open+0x20b/0x470 fs/namei.c:4066 do_sys_openat2+0x11b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1c23e80407 Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007ffd81bba620 EFLAGS: 00000202 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f1c23df6740 RCX: 00007f1c23e80407 RDX: 0000000000000000 RSI: 00007ffd81bca8d0 RDI: ffffffffffffff9c RBP: 00000000000100a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffd81bba750 R13: 00007f1c23df66c8 R14: 000000000000001e R15: 00007ffd81bca840 Allocated by task 1: 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+0xaa/0xb0 mm/kasan/common.c:394 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] tty_register_device_attr+0x220/0x7c0 drivers/tty/tty_io.c:3260 tty_register_device drivers/tty/tty_io.c:3209 [inline] tty_register_driver+0x426/0x7f0 drivers/tty/tty_io.c:3474 legacy_pty_init drivers/tty/pty.c:581 [inline] pty_init+0x688/0x10f0 drivers/tty/pty.c:943 do_one_initcall+0x123/0x6e0 init/main.c:1257 do_initcall_level init/main.c:1319 [inline] do_initcalls init/main.c:1335 [inline] do_basic_setup init/main.c:1354 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1567 kernel_init+0x1c/0x2b0 init/main.c:1457 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888024fbf000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 2967 bytes to the right of allocated 1128-byte region [ffff888024fbf000, ffff888024fbf468) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x24fb8 head: order:3 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 ffff88801b442000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b442000 dead000000000122 0000000000000000 head: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea000093ee01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 14488857094, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2450 [inline] allocate_slab mm/slub.c:2618 [inline] new_slab+0x244/0x340 mm/slub.c:2672 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3858 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3948 __slab_alloc_node mm/slub.c:4023 [inline] slab_alloc_node mm/slub.c:4184 [inline] __kmalloc_cache_noprof+0xfb/0x3e0 mm/slub.c:4353 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] tty_register_device_attr+0x220/0x7c0 drivers/tty/tty_io.c:3260 tty_register_device drivers/tty/tty_io.c:3209 [inline] tty_register_driver+0x426/0x7f0 drivers/tty/tty_io.c:3474 legacy_pty_init drivers/tty/pty.c:581 [inline] pty_init+0x688/0x10f0 drivers/tty/pty.c:943 do_one_initcall+0x123/0x6e0 init/main.c:1257 do_initcall_level init/main.c:1319 [inline] do_initcalls init/main.c:1335 [inline] do_basic_setup init/main.c:1354 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1567 kernel_init+0x1c/0x2b0 init/main.c:1457 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page_owner free stack trace missing Memory state around the buggy address: ffff888024fbfe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888024fbff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888024fbff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888024fc0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888024fc0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== vkms_vblank_simulate: vblank timer overrun vkms_vblank_simulate: vblank timer overrun ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 00 00 add %al,(%rax) 2: 44 8b 05 29 d8 fb 0e mov 0xefbd829(%rip),%r8d # 0xefbd832 9: 45 85 c0 test %r8d,%r8d c: 0f 85 be 01 00 00 jne 0x1d0 12: 4c 89 e7 mov %r12,%rdi 15: e8 a4 f6 ff ff call 0xfffff6be 1a: e8 7f 78 39 00 call 0x39789e 1f: fb sti 20: 65 48 8b 1d 8e 42 1a mov %gs:0x121a428e(%rip),%rbx # 0x121a42b6 27: 12 * 28: 48 8d bb 18 16 00 00 lea 0x1618(%rbx),%rdi <-- trapping instruction 2f: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 36: fc ff df 39: 48 89 fa mov %rdi,%rdx 3c: 48 rex.W 3d: c1 .byte 0xc1