input: syz0 as /devices/virtual/input/input37 ================================================================== BUG: KASAN: slab-out-of-bounds in string_nocheck lib/vsprintf.c:643 [inline] BUG: KASAN: slab-out-of-bounds in string+0x21f/0x2b0 lib/vsprintf.c:725 Read of size 1 at addr ffff8881321600c9 by task syz.1.3094/8143 CPU: 0 PID: 8143 Comm: syz.1.3094 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x71/0x1e0 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:418 kasan_report+0x122/0x150 mm/kasan/report.c:522 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:348 string_nocheck lib/vsprintf.c:643 [inline] string+0x21f/0x2b0 lib/vsprintf.c:725 vsnprintf+0xed9/0x1960 lib/vsprintf.c:2805 seq_vprintf fs/seq_file.c:391 [inline] seq_printf+0x175/0x260 fs/seq_file.c:406 input_devices_seq_show+0x1a6/0x650 drivers/input/input.c:1204 seq_read_iter+0x9c8/0xdd0 fs/seq_file.c:272 seq_read+0x159/0x1f0 fs/seq_file.c:162 pde_read fs/proc/inode.c:316 [inline] proc_reg_read+0x1e4/0x2d0 fs/proc/inode.c:328 vfs_read+0x26e/0x8c0 fs/read_write.c:468 ksys_read+0x140/0x240 fs/read_write.c:613 __do_sys_read fs/read_write.c:623 [inline] __se_sys_read fs/read_write.c:621 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:621 x64_sys_call+0x2f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:1 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f9d39d8eba9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9d3ac7e038 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007f9d39fd5fa0 RCX: 00007f9d39d8eba9 RDX: 0000000000002020 RSI: 0000200000002300 RDI: 0000000000000003 RBP: 00007f9d39e11e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9d39fd6038 R14: 00007f9d39fd5fa0 R15: 00007ffdb68568d8 Allocated by task 0: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_alloc_info+0x25/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:379 [inline] __kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:388 kasan_kmalloc include/linux/kasan.h:212 [inline] kmalloc_trace+0x40/0xb0 mm/slab_common.c:1033 kmalloc include/linux/slab.h:563 [inline] dummy_urb_enqueue+0x7b/0x7b0 drivers/usb/gadget/udc/dummy_hcd.c:1273 usb_hcd_submit_urb+0x336/0x1830 drivers/usb/core/hcd.c:1560 usb_submit_urb+0x122d/0x1900 drivers/usb/core/urb.c:596 hid_irq_in+0x50c/0x6b0 drivers/hid/usbhid/hid-core.c:322 __usb_hcd_giveback_urb+0x364/0x520 drivers/usb/core/hcd.c:1675 usb_hcd_giveback_urb+0x11c/0x410 drivers/usb/core/hcd.c:1758 dummy_timer+0x86f/0x2ea0 drivers/usb/gadget/udc/dummy_hcd.c:1994 __run_hrtimer kernel/time/hrtimer.c:1690 [inline] __hrtimer_run_queues+0x3cd/0x9f0 kernel/time/hrtimer.c:1754 hrtimer_run_softirq+0x19b/0x260 kernel/time/hrtimer.c:1771 handle_softirqs+0x1d7/0x600 kernel/softirq.c:642 __do_softirq kernel/softirq.c:680 [inline] invoke_softirq kernel/softirq.c:497 [inline] __irq_exit_rcu+0x52/0xf0 kernel/softirq.c:729 irq_exit_rcu+0x9/0x10 kernel/softirq.c:741 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline] sysvec_apic_timer_interrupt+0xa9/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:691 Freed by task 0: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x31/0x50 mm/kasan/generic.c:516 ____kasan_slab_free+0x132/0x180 mm/kasan/common.c:241 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:249 kasan_slab_free include/linux/kasan.h:178 [inline] slab_free_hook mm/slub.c:1745 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1771 slab_free mm/slub.c:3686 [inline] __kmem_cache_free+0xb7/0x1b0 mm/slub.c:3702 kfree+0x6f/0xf0 mm/slab_common.c:990 dummy_timer+0x7e5/0x2ea0 drivers/usb/gadget/udc/dummy_hcd.c:1988 __run_hrtimer kernel/time/hrtimer.c:1690 [inline] __hrtimer_run_queues+0x3cd/0x9f0 kernel/time/hrtimer.c:1754 hrtimer_run_softirq+0x19b/0x260 kernel/time/hrtimer.c:1771 handle_softirqs+0x1d7/0x600 kernel/softirq.c:642 __do_softirq kernel/softirq.c:680 [inline] invoke_softirq kernel/softirq.c:497 [inline] __irq_exit_rcu+0x52/0xf0 kernel/softirq.c:729 irq_exit_rcu+0x9/0x10 kernel/softirq.c:741 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline] sysvec_apic_timer_interrupt+0xa9/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:691 The buggy address belongs to the object at ffff888132160000 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 73 bytes to the right of 128-byte region [ffff888132160000, ffff888132160080) The buggy address belongs to the physical page: page:ffffea0004c85800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x132160 flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff888100042a80 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 0, tgid 0 (swapper/0), ts 149645557332, free_ts 149374063295 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2643 prep_new_page+0x1c/0x110 mm/page_alloc.c:2650 get_page_from_freelist+0x2c7b/0x2cf0 mm/page_alloc.c:4554 __alloc_pages+0x1c3/0x450 mm/page_alloc.c:5868 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1 allocate_slab mm/slub.c:1962 [inline] new_slab+0x98/0x3d0 mm/slub.c:2015 ___slab_alloc+0x6f6/0xb50 mm/slub.c:3203 __slab_alloc+0x5e/0xa0 mm/slub.c:3302 slab_alloc_node mm/slub.c:3387 [inline] __kmem_cache_alloc_node+0x203/0x2c0 mm/slub.c:3462 kmalloc_trace+0x29/0xb0 mm/slab_common.c:1028 kmalloc include/linux/slab.h:563 [inline] dummy_urb_enqueue+0x7b/0x7b0 drivers/usb/gadget/udc/dummy_hcd.c:1273 usb_hcd_submit_urb+0x336/0x1830 drivers/usb/core/hcd.c:1560 usb_submit_urb+0x122d/0x1900 drivers/usb/core/urb.c:596 hid_irq_in+0x50c/0x6b0 drivers/hid/usbhid/hid-core.c:322 __usb_hcd_giveback_urb+0x364/0x520 drivers/usb/core/hcd.c:1675 usb_hcd_giveback_urb+0x11c/0x410 drivers/usb/core/hcd.c:1758 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1551 [inline] free_pcp_prepare mm/page_alloc.c:1625 [inline] free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3589 free_unref_page_list+0x112/0x8b0 mm/page_alloc.c:3740 release_pages+0xad1/0xb20 mm/swap.c:1043 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:315 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline] tlb_flush_mmu_free mm/mmu_gather.c:254 [inline] tlb_flush_mmu mm/mmu_gather.c:261 [inline] tlb_finish_mmu+0x1aa/0x370 mm/mmu_gather.c:361 exit_mmap+0x3dd/0xb60 mm/mmap.c:3378 __mmput+0x93/0x320 kernel/fork.c:1300 mmput+0x4b/0x150 kernel/fork.c:1323 exit_mm kernel/exit.c:568 [inline] do_exit+0x981/0x2650 kernel/exit.c:873 do_group_exit+0x210/0x2d0 kernel/exit.c:1028 get_signal+0x13b5/0x1520 kernel/signal.c:2889 arch_do_signal_or_restart+0xb0/0x1030 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x7a/0xb0 kernel/entry/common.c:174 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87 Memory state around the buggy address: ffff88813215ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888132160000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888132160080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888132160100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888132160180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================