CIFS: VFS: \\127.0.0.1 SMB response too short (0 bytes) ================================================================== BUG: KASAN: use-after-free in reconn_set_ipaddr_from_hostname+0x417/0x600 fs/smb/client/connect.c:101 Read of size 1 at addr ffff888019bd06a0 by task cifsd/5098 CPU: 0 PID: 5098 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/0x24e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 reconn_set_ipaddr_from_hostname+0x417/0x600 fs/smb/client/connect.c:101 __cifs_reconnect+0x1a5/0x870 fs/smb/client/connect.c:444 cifs_reconnect+0x231/0xd20 fs/smb/client/connect.c:618 cifs_demultiplex_thread+0x1e38/0x35b0 fs/smb/client/connect.c:-1 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 5097: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:384 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc_node_track_caller+0xb0/0x240 mm/slab_common.c:956 kstrdup+0x37/0x70 mm/util.c:61 cifs_get_tcp_session+0xea/0x1ad0 fs/smb/client/connect.c:1740 mount_get_conns+0xb6/0xec0 fs/smb/client/connect.c:3367 is_dfs_mount fs/smb/client/connect.c:3746 [inline] cifs_mount+0x16a/0x13c0 fs/smb/client/connect.c:3951 cifs_smb3_do_mount+0x366/0x760 fs/smb/client/cifsfs.c:948 smb3_get_tree_common fs/smb/client/fs_context.c:712 [inline] smb3_get_tree+0x5a1/0xa90 fs/smb/client/fs_context.c:732 vfs_get_tree+0x88/0x270 fs/super.c:1584 do_new_mount+0x247/0xa40 fs/namespace.c:3078 do_mount fs/namespace.c:3421 [inline] __do_sys_mount fs/namespace.c:3629 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3606 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 5097: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1729 [inline] slab_free_freelist_hook+0x133/0x1b0 mm/slub.c:1755 slab_free mm/slub.c:3687 [inline] __kmem_cache_free+0xb6/0x200 mm/slub.c:3700 cifs_put_tcp_session+0x319/0x400 fs/smb/client/connect.c:1712 mount_put_conns+0xb0/0x270 fs/smb/client/connect.c:3348 cifs_mount+0x1097/0x13c0 fs/smb/client/connect.c:4000 cifs_smb3_do_mount+0x366/0x760 fs/smb/client/cifsfs.c:948 smb3_get_tree_common fs/smb/client/fs_context.c:712 [inline] smb3_get_tree+0x5a1/0xa90 fs/smb/client/fs_context.c:732 vfs_get_tree+0x88/0x270 fs/super.c:1584 do_new_mount+0x247/0xa40 fs/namespace.c:3078 do_mount fs/namespace.c:3421 [inline] __do_sys_mount fs/namespace.c:3629 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3606 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff888019bd06a0 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 0 bytes inside of 16-byte region [ffff888019bd06a0, ffff888019bd06b0) The buggy address belongs to the physical page: page:ffffea000066f400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x19bd0 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000156d9c0 dead000000000002 ffff8880174413c0 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 11, tgid 11 (kworker/u4:1), ts 5462516426, free_ts 5453719538 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560 prep_new_page mm/page_alloc.c:2567 [inline] get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658 alloc_slab_page+0x5d/0x180 mm/slub.c:1799 allocate_slab mm/slub.c:1944 [inline] new_slab+0x87/0x2d0 mm/slub.c:1997 ___slab_alloc+0xbc5/0x1240 mm/slub.c:3154 __slab_alloc mm/slub.c:3240 [inline] slab_alloc_node mm/slub.c:3325 [inline] __kmem_cache_alloc_node+0x126/0x270 mm/slub.c:3398 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:699 [inline] create_new_subsystem kernel/trace/trace_events.c:2436 [inline] event_subsystem_dir kernel/trace/trace_events.c:2482 [inline] event_create_dir+0x3e2/0xe50 kernel/trace/trace_events.c:2582 __trace_early_add_event_dirs+0x6e/0x200 kernel/trace/trace_events.c:3663 early_event_add_tracer+0x52/0x70 kernel/trace/trace_events.c:3824 event_trace_init+0xe2/0x160 kernel/trace/trace_events.c:4002 tracer_init_tracefs_work_func+0xd/0x13b kernel/trace/trace.c:9944 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1487 [inline] free_pcp_prepare mm/page_alloc.c:1537 [inline] free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3414 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3509 __vunmap+0x874/0xa40 mm/vmalloc.c:2783 free_work+0x56/0x80 mm/vmalloc.c:97 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff888019bd0580: 00 00 fc fc 00 01 fc fc 00 00 fc fc 00 00 fc fc ffff888019bd0600: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc >ffff888019bd0680: 00 00 fc fc fa fb fc fc 00 00 fc fc 00 00 fc fc ^ ffff888019bd0700: 00 00 fc fc 00 00 fc fc 00 01 fc fc 00 01 fc fc ffff888019bd0780: fa fb fc fc 00 00 fc fc 00 06 fc fc 00 01 fc fc ==================================================================