KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname

Status: upstream: reported C repro on 2026/08/07 16:20
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+aa3992db0ca16a888f46@syzkaller.appspotmail.com
First crash: 108d, last: 2d08h
▶ ▼ Bug presence (2)
Date Name Commit Repro Result
2026/11/07 linux-5.15.y (ToT) 29c6cdaac04a C [report] KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/11/07 upstream (ToT) d48723711bae C Didn't crash
▶ ▼ Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname origin:lts-only 19 syz, C inconclusive 107 27d 111d 0/3 upstream: reported C repro on 2026/08/04 16:29
▶ ▼ Last patch testing requests (3)
Created Duration User Patch Repo Result
2026/09/30 01:27 0m retest repro linux-5.15.y error job log
2026/09/30 01:27 0m retest repro linux-5.15.y error job log
2026/09/30 01:27 0m retest repro linux-5.15.y error job log

Sample crash report:
==================================================================
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 ffff88802cce92c0 by task cifsd/4813

CPU: 0 PID: 4813 Comm: cifsd Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
 <TASK>
 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
 </TASK>

Allocated by task 4812:
 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:2989
 is_dfs_mount fs/cifs/connect.c:3355 [inline]
 cifs_mount+0x162/0x1380 fs/cifs/connect.c:3550
 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/0xa50 fs/namespace.c:3060
 do_mount fs/namespace.c:3431 [inline]
 __do_sys_mount fs/namespace.c:3639 [inline]
 __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3616
 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 4812:
 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:2970
 cifs_mount+0xbf5/0x1380 fs/cifs/connect.c:3598
 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/0xa50 fs/namespace.c:3060
 do_mount fs/namespace.c:3431 [inline]
 __do_sys_mount fs/namespace.c:3639 [inline]
 __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3616
 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 ffff88802cce92c0
 which belongs to the cache kmalloc-16 of size 16
The buggy address is located 0 bytes inside of
 16-byte region [ffff88802cce92c0, ffff88802cce92d0)
The buggy address belongs to the page:
page:ffffea0000b33a40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2cce9
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 0000000000000000 dead000000000122 ffff8880178413c0
raw: 0000000000000000 0000000080800080 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 4330, ts 146222281248, free_ts 146216451037
 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_pages_node include/linux/gfp.h:570 [inline]
 alloc_slab_page mm/slub.c:1782 [inline]
 allocate_slab mm/slub.c:1917 [inline]
 new_slab+0xb6/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]
 __kmalloc_node+0x142/0x3a0 mm/slub.c:4456
 kmalloc_node include/linux/slab.h:630 [inline]
 kvmalloc_node+0x84/0x130 mm/util.c:619
 xt_jumpstack_alloc net/netfilter/x_tables.c:1377 [inline]
 xt_replace_table+0x160/0x750 net/netfilter/x_tables.c:1416
 __do_replace+0x16f/0xa00 net/ipv6/netfilter/ip6_tables.c:1086
 do_replace net/ipv6/netfilter/ip6_tables.c:1163 [inline]
 do_ip6t_set_ctl+0xaa4/0xd90 net/ipv6/netfilter/ip6_tables.c:1648
 nf_setsockopt+0x25f/0x280 net/netfilter/nf_sockopt.c:101
 ipv6_setsockopt+0x20ba/0x3cc0 net/ipv6/ipv6_sockglue.c:1014
 tcp_setsockopt+0x229/0x1e60 net/ipv4/tcp.c:3722
 __sys_setsockopt+0x2bf/0x3d0 net/socket.c:2213
 __do_sys_setsockopt net/socket.c:2224 [inline]
 __se_sys_setsockopt net/socket.c:2221 [inline]
 __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2221
 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
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_list+0x119/0x830 mm/page_alloc.c:3433
 release_pages+0x185f/0x1bd0 mm/swap.c:963
 tlb_batch_pages_flush mm/mmu_gather.c:50 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:241 [inline]
 tlb_flush_mmu mm/mmu_gather.c:248 [inline]
 tlb_finish_mmu+0x1b4/0x370 mm/mmu_gather.c:371
 exit_mmap+0x3d0/0x640 mm/mmap.c:3226
 __mmput+0x115/0x390 kernel/fork.c:1136
 exit_mm+0x632/0x7b0 kernel/exit.c:557
 do_exit+0x5b8/0x2100 kernel/exit.c:877
 do_group_exit+0x12c/0x2f0 kernel/exit.c:1004
 get_signal+0x7eb/0x12e0 kernel/signal.c:2917
 arch_do_signal_or_restart+0xe6/0x12a0 arch/x86/kernel/signal.c:867
 handle_signal_work kernel/entry/common.c:157 [inline]
 exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:181
 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:217
 __syscall_exit_to_user_mode_work kernel/entry/common.c:299 [inline]
 syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:310
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Memory state around the buggy address:
 ffff88802cce9180: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
 ffff88802cce9200: fa fb fc fc 00 00 fc fc fa fb fc fc fa fb fc fc
>ffff88802cce9280: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
                                           ^
 ffff88802cce9300: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
 ffff88802cce9380: fa fb fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc
==================================================================

Crashes (33):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/21 19:57 linux-5.15.y 29c6cdaac04a b2c69459 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/08/07 23:22 linux-5.15.y aabd761612db e4ef95d6 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/09/12 00:25 linux-5.15.y 0996e0926f6b b6a5eeb7 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/08/10 09:38 linux-5.15.y aabd761612db 5d63f80b .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/11/06 23:01 linux-5.15.y 29c6cdaac04a 5cecaf1f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/11/04 01:49 linux-5.15.y 700e62ea909a e2d35131 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/11/01 18:39 linux-5.15.y 700e62ea909a 25a0ae84 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/10/20 14:04 linux-5.15.y 792fbe1537d8 df8746fb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/10/19 04:33 linux-5.15.y 792fbe1537d8 432c0077 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/10/17 07:38 linux-5.15.y 792fbe1537d8 432c0077 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/10/10 21:08 linux-5.15.y a051a4bf909f 4f92358f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/10/10 21:08 linux-5.15.y a051a4bf909f 4f92358f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/10/07 00:19 linux-5.15.y a051a4bf909f f7710056 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/10/01 09:02 linux-5.15.y 0248c33e835e 38f7f0d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/10/01 01:57 linux-5.15.y 0248c33e835e 38f7f0d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/09/30 15:16 linux-5.15.y 0248c33e835e 7808aef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/09/30 15:16 linux-5.15.y 0248c33e835e 7808aef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/09/14 18:06 linux-5.15.y 0248c33e835e 81a27d1a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/09/14 08:48 linux-5.15.y 0996e0926f6b 70a60e12 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/09/14 08:45 linux-5.15.y 0996e0926f6b 70a60e12 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/09/14 08:44 linux-5.15.y 0996e0926f6b 70a60e12 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/09/14 08:42 linux-5.15.y 0996e0926f6b 70a60e12 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/09/14 08:37 linux-5.15.y 0996e0926f6b 70a60e12 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/09/11 23:05 linux-5.15.y 0996e0926f6b b6a5eeb7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/09/10 19:13 linux-5.15.y 0996e0926f6b 1fe56c0a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/09/10 03:50 linux-5.15.y 0996e0926f6b 4e8b1cc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/09/04 02:31 linux-5.15.y 0996e0926f6b 801f0966 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/08/27 17:04 linux-5.15.y 4a1eaf96ee5c 69a01293 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/08/26 18:47 linux-5.15.y 945fa863f02c a2b77b9e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/08/16 06:30 linux-5.15.y aabd761612db 746171ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/08/12 21:35 linux-5.15.y aabd761612db 359b2492 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/08/08 09:20 linux-5.15.y aabd761612db 5d63f80b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
2026/08/07 16:20 linux-5.15.y aabd761612db e4ef95d6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in reconn_set_ipaddr_from_hostname
* Struck through repros no longer work on HEAD.