================================================================== BUG: KASAN: use-after-free in string_nocheck lib/vsprintf.c:641 [inline] BUG: KASAN: use-after-free in string+0x21f/0x2b0 lib/vsprintf.c:723 Read of size 1 at addr ffff88810b53c4b9 by task syz.4.2439/9041 CPU: 0 PID: 9041 Comm: syz.4.2439 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/14/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x169/0x1d8 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0xe2/0x130 mm/kasan/report.c:452 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306 string_nocheck lib/vsprintf.c:641 [inline] string+0x21f/0x2b0 lib/vsprintf.c:723 vsnprintf+0xf20/0x1960 lib/vsprintf.c:2689 seq_vprintf fs/seq_file.c:398 [inline] seq_printf+0x175/0x260 fs/seq_file.c:413 input_devices_seq_show+0x1a6/0x650 drivers/input/input.c:1186 traverse+0x1d1/0x510 fs/seq_file.c:111 seq_read_iter+0xc57/0xd30 fs/seq_file.c:195 seq_read+0x3cc/0x4d0 fs/seq_file.c:162 pde_read fs/proc/inode.c:321 [inline] proc_reg_read+0x1c4/0x2b0 fs/proc/inode.c:333 vfs_read+0x1fe/0xa10 fs/read_write.c:494 ksys_pread64 fs/read_write.c:686 [inline] __do_sys_pread64 fs/read_write.c:696 [inline] __se_sys_pread64 fs/read_write.c:693 [inline] __x64_sys_pread64+0x191/0x220 fs/read_write.c:693 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f69f3a56ba9 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:00007f69f24bf038 EFLAGS: 00000246 ORIG_RAX: 0000000000000011 RAX: ffffffffffffffda RBX: 00007f69f3c9dfa0 RCX: 00007f69f3a56ba9 RDX: 00000000000000de RSI: 00002000000007c0 RDI: 0000000000000006 RBP: 00007f69f3ad9e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0018000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f69f3c9e038 R14: 00007f69f3c9dfa0 R15: 00007fffd58cf8d8 Allocated by task 8352: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] ____kasan_kmalloc mm/kasan/common.c:509 [inline] __kasan_kmalloc+0xda/0x110 mm/kasan/common.c:518 kasan_kmalloc include/linux/kasan.h:254 [inline] kmem_cache_alloc_trace+0x184/0x2e0 mm/slub.c:2979 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] crypto_larval_alloc crypto/api.c:110 [inline] crypto_larval_add crypto/api.c:132 [inline] crypto_larval_lookup crypto/api.c:281 [inline] crypto_alg_mod_lookup+0x1b8/0x710 crypto/api.c:316 crypto_find_alg+0x96/0xf0 crypto/api.c:529 crypto_type_has_alg+0x2b/0x60 crypto/algapi.c:1083 crypto_has_skcipher+0x2a/0x40 crypto/skcipher.c:792 xfrm_probe_algs+0x1ac/0x370 net/xfrm/xfrm_algo.c:789 pfkey_register+0x11e/0x840 net/key/af_key.c:1705 pfkey_process net/key/af_key.c:2852 [inline] pfkey_sendmsg+0xbef/0x1050 net/key/af_key.c:3703 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] ____sys_sendmsg+0x5a2/0x8c0 net/socket.c:2376 ___sys_sendmsg+0x1f0/0x260 net/socket.c:2430 __sys_sendmsg net/socket.c:2459 [inline] __do_sys_sendmsg net/socket.c:2468 [inline] __se_sys_sendmsg net/socket.c:2466 [inline] __x64_sys_sendmsg+0x1e2/0x2a0 net/socket.c:2466 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 8902: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1600 [inline] slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626 slab_free mm/slub.c:3208 [inline] kfree+0xc0/0x270 mm/slub.c:4196 skb_free_head net/core/skbuff.c:606 [inline] skb_release_data+0x532/0x670 net/core/skbuff.c:626 skb_release_all net/core/skbuff.c:680 [inline] __kfree_skb net/core/skbuff.c:694 [inline] kfree_skb+0xb9/0x2f0 net/core/skbuff.c:713 unix_release_sock+0x82c/0xad0 net/unix/af_unix.c:563 unix_release+0x4e/0x80 net/unix/af_unix.c:869 __sock_release net/socket.c:597 [inline] sock_close+0xe0/0x270 net/socket.c:1286 __fput+0x2fb/0x770 fs/file_table.c:281 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x127/0x190 kernel/task_work.c:189 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop+0xcb/0xe0 kernel/entry/common.c:172 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline] syscall_exit_to_user_mode+0x68/0x90 kernel/entry/common.c:274 do_syscall_64+0x3d/0x40 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x61/0xcb Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu kernel/rcu/tree.c:2980 [inline] call_rcu+0x10e/0x1050 kernel/rcu/tree.c:3054 pppol2tp_release+0x208/0x2d0 net/l2tp/l2tp_ppp.c:458 __sock_release net/socket.c:597 [inline] sock_close+0xe0/0x270 net/socket.c:1286 __fput+0x2fb/0x770 fs/file_table.c:281 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x127/0x190 kernel/task_work.c:189 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop+0xcb/0xe0 kernel/entry/common.c:172 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline] syscall_exit_to_user_mode+0x68/0x90 kernel/entry/common.c:274 do_syscall_64+0x3d/0x40 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff88810b53c400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 185 bytes inside of 512-byte region [ffff88810b53c400, ffff88810b53c600) The buggy address belongs to the page: page:ffffea00042d4f00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10b53c head:ffffea00042d4f00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100043080 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd2000(__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, ts 2906526667, free_ts 0 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x179/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2235/0x23d0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x268/0x5f0 mm/page_alloc.c:5370 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1813 [inline] new_slab+0x84/0x3f0 mm/slub.c:1874 new_slab_objects mm/slub.c:2632 [inline] ___slab_alloc+0x2a6/0x450 mm/slub.c:2796 __slab_alloc+0x63/0xa0 mm/slub.c:2836 slab_alloc_node mm/slub.c:2918 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc_trace+0x1b3/0x2e0 mm/slub.c:2977 kmalloc include/linux/slab.h:552 [inline] usb_cache_string+0x64/0x100 drivers/usb/core/message.c:1027 usb_enumerate_device drivers/usb/core/hub.c:2500 [inline] usb_new_device+0x35e/0x1450 drivers/usb/core/hub.c:2623 register_root_hub+0x269/0x480 drivers/usb/core/hcd.c:1020 usb_add_hcd+0xa6f/0xef0 drivers/usb/core/hcd.c:2838 dummy_hcd_probe+0x14a/0x290 drivers/usb/gadget/udc/dummy_hcd.c:2662 platform_drv_probe+0x11b/0x1a0 drivers/base/platform.c:761 really_probe+0x3d8/0xa90 drivers/base/dd.c:562 driver_probe_device+0xe7/0x190 drivers/base/dd.c:752 __device_attach_driver+0x282/0x3f0 drivers/base/dd.c:863 page_owner free stack trace missing Memory state around the buggy address: ffff88810b53c380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88810b53c400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88810b53c480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88810b53c500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88810b53c580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== FAT-fs (loop4): Directory bread(block 64) failed FAT-fs (loop4): Directory bread(block 65) failed FAT-fs (loop4): Directory bread(block 66) failed FAT-fs (loop4): Directory bread(block 67) failed FAT-fs (loop4): Directory bread(block 68) failed FAT-fs (loop4): Directory bread(block 69) failed FAT-fs (loop4): Directory bread(block 70) failed FAT-fs (loop4): Directory bread(block 71) failed FAT-fs (loop4): Directory bread(block 72) failed FAT-fs (loop4): Directory bread(block 73) failed