================================================================== BUG: KASAN: use-after-free in string_nocheck lib/vsprintf.c:642 [inline] BUG: KASAN: use-after-free in string+0x204/0x290 lib/vsprintf.c:724 Read of size 1 at addr ffff888022af3f60 by task cifsd/9166 CPU: 1 PID: 9166 Comm: cifsd Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 string_nocheck lib/vsprintf.c:642 [inline] string+0x204/0x290 lib/vsprintf.c:724 vsnprintf+0x10db/0x1c20 lib/vsprintf.c:2811 vscnprintf lib/vsprintf.c:2914 [inline] scnprintf+0xe5/0x180 lib/vsprintf.c:2968 reconn_set_ipaddr_from_hostname+0x112/0x580 fs/cifs/connect.c:107 __cifs_reconnect fs/cifs/connect.c:288 [inline] cifs_reconnect+0x470/0x1350 fs/cifs/connect.c:447 cifs_readv_from_socket+0x7c4/0x8b0 fs/cifs/connect.c:-1 cifs_read_from_socket fs/cifs/connect.c:626 [inline] cifs_demultiplex_thread+0x53b/0x35b0 fs/cifs/connect.c:989 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Allocated by task 9162: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522 kstrdup+0x32/0x70 mm/util.c:60 cifs_get_tcp_session+0xde/0x18f0 fs/cifs/connect.c:1431 mount_get_conns+0xc3/0xe00 fs/cifs/connect.c:2988 is_dfs_mount fs/cifs/connect.c:3354 [inline] cifs_mount+0x162/0x1380 fs/cifs/connect.c:3549 cifs_smb3_do_mount+0x366/0x760 fs/cifs/cifsfs.c:895 smb3_get_tree_common fs/cifs/fs_context.c:708 [inline] smb3_get_tree+0x59a/0xa80 fs/cifs/fs_context.c:726 vfs_get_tree+0x88/0x270 fs/super.c:1541 do_new_mount+0x247/0xa40 fs/namespace.c:3034 do_mount fs/namespace.c:3377 [inline] __do_sys_mount fs/namespace.c:3585 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3562 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 9162: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0xef/0x2a0 mm/slub.c:4564 cifs_put_tcp_session+0x2e1/0x3d0 fs/cifs/connect.c:1404 mount_put_conns+0xb0/0x270 fs/cifs/connect.c:2969 cifs_mount+0xbf5/0x1380 fs/cifs/connect.c:3597 cifs_smb3_do_mount+0x366/0x760 fs/cifs/cifsfs.c:895 smb3_get_tree_common fs/cifs/fs_context.c:708 [inline] smb3_get_tree+0x59a/0xa80 fs/cifs/fs_context.c:726 vfs_get_tree+0x88/0x270 fs/super.c:1541 do_new_mount+0x247/0xa40 fs/namespace.c:3034 do_mount fs/namespace.c:3377 [inline] __do_sys_mount fs/namespace.c:3585 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3562 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888022af3f60 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 0 bytes inside of 16-byte region [ffff888022af3f60, ffff888022af3f70) The buggy address belongs to the page: page:ffffea00008abcc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x22af3 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff888016c413c0 raw: 0000000000000000 0000000000800080 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 23, ts 6958483910, free_ts 6951576364 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] slab_alloc mm/slub.c:3233 [inline] __kmalloc_track_caller+0x11b/0x330 mm/slub.c:4930 kstrdup+0x32/0x70 mm/util.c:60 create_path drivers/base/devtmpfs.c:187 [inline] handle_create drivers/base/devtmpfs.c:216 [inline] handle drivers/base/devtmpfs.c:387 [inline] devtmpfs_work_loop+0x299/0xe40 drivers/base/devtmpfs.c:402 devtmpfsd+0x44/0x50 drivers/base/devtmpfs.c:444 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396 mm_free_pgd kernel/fork.c:654 [inline] __mmdrop+0xaa/0x3e0 kernel/fork.c:705 free_bprm+0x122/0x2d0 fs/exec.c:1494 kernel_execve+0x386/0x8e0 fs/exec.c:2015 call_usermodehelper_exec_async+0x207/0x350 kernel/umh.c:112 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff888022af3e00: 00 04 fc fc 00 04 fc fc 00 04 fc fc 00 04 fc fc ffff888022af3e80: 00 04 fc fc 00 04 fc fc 00 04 fc fc 00 04 fc fc >ffff888022af3f00: 00 04 fc fc 00 04 fc fc 00 04 fc fc fa fb fc fc ^ ffff888022af3f80: fa fb fc fc fa fb fc fc 00 00 fc fc 00 00 fc fc ffff888022af4000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================