syzbot


KASAN: slab-use-after-free Read in clone_mnt

Status: moderation: reported on 2026/01/19 07:39
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+b88d8faf100c16b5a67f@syzkaller.appspotmail.com
First crash: 6d16h, last: 1d18h

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in __list_add_valid_or_report+0x4e/0x130 lib/list_debug.c:29
Read of size 8 at addr ffff88801bedb940 by task syz.0.792/9551

CPU: 1 UID: 0 PID: 9551 Comm: syz.0.792 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xca/0x240 mm/kasan/report.c:482
 kasan_report+0x118/0x150 mm/kasan/report.c:595
 __list_add_valid_or_report+0x4e/0x130 lib/list_debug.c:29
 __list_add_valid include/linux/list.h:96 [inline]
 __list_add include/linux/list.h:158 [inline]
 list_add include/linux/list.h:177 [inline]
 clone_mnt+0x447/0x9a0 fs/namespace.c:1275
 copy_tree+0xde/0x930 fs/namespace.c:2159
 copy_mnt_ns+0x11f/0x7c0 fs/namespace.c:4246
 create_new_namespaces+0xcf/0x6a0 kernel/nsproxy.c:98
 unshare_nsproxy_namespaces+0x11c/0x170 kernel/nsproxy.c:226
 ksys_unshare+0x4c8/0x8c0 kernel/fork.c:3168
 __do_sys_unshare kernel/fork.c:3239 [inline]
 __se_sys_unshare kernel/fork.c:3237 [inline]
 __x64_sys_unshare+0x38/0x50 kernel/fork.c:3237
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f965c78f749
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:00007f965d5f7038 EFLAGS: 00000246 ORIG_RAX: 0000000000000110
RAX: ffffffffffffffda RBX: 00007f965c9e6180 RCX: 00007f965c78f749
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000022020600
RBP: 00007f965c813f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f965c9e6218 R14: 00007f965c9e6180 R15: 00007fff7601efa8
 </TASK>

Allocated by task 9002:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 unpoison_slab_object mm/kasan/common.c:340 [inline]
 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
 kasan_slab_alloc include/linux/kasan.h:253 [inline]
 slab_post_alloc_hook mm/slub.c:4411 [inline]
 slab_alloc_node mm/slub.c:4740 [inline]
 kmem_cache_alloc_noprof+0x2bd/0x660 mm/slub.c:4747
 alloc_vfsmnt+0x23/0x420 fs/namespace.c:287
 clone_mnt+0x4b/0x9a0 fs/namespace.c:1246
 copy_tree+0x3d4/0x930 fs/namespace.c:2194
 copy_mnt_ns+0x11f/0x7c0 fs/namespace.c:4246
 create_new_namespaces+0xcf/0x6a0 kernel/nsproxy.c:98
 unshare_nsproxy_namespaces+0x11c/0x170 kernel/nsproxy.c:226
 ksys_unshare+0x4c8/0x8c0 kernel/fork.c:3168
 __do_sys_unshare kernel/fork.c:3239 [inline]
 __se_sys_unshare kernel/fork.c:3237 [inline]
 __x64_sys_unshare+0x38/0x50 kernel/fork.c:3237
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 7910:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2627 [inline]
 slab_free mm/slub.c:6013 [inline]
 kmem_cache_free+0x192/0x5d0 mm/slub.c:6126
 rcu_do_batch kernel/rcu/tree.c:2617 [inline]
 rcu_core+0x7bd/0x1060 kernel/rcu/tree.c:2869
 handle_softirqs+0x22b/0x7c0 kernel/softirq.c:626
 do_softirq+0x76/0xd0 kernel/softirq.c:523
 __local_bh_enable_ip+0xf8/0x130 kernel/softirq.c:450
 local_bh_enable include/linux/bottom_half.h:33 [inline]
 __alloc_skb+0x1b4/0x720 net/core/skbuff.c:691
 netlink_sendmsg+0x5c6/0xb30 net/netlink/af_netlink.c:1869
 sock_sendmsg_nosec+0x18f/0x1d0 net/socket.c:737
 __sock_sendmsg net/socket.c:752 [inline]
 ____sys_sendmsg+0x577/0x880 net/socket.c:2610
 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2664
 __sys_sendmsg net/socket.c:2696 [inline]
 __do_sys_sendmsg net/socket.c:2701 [inline]
 __se_sys_sendmsg net/socket.c:2699 [inline]
 __x64_sys_sendmsg+0x19b/0x260 net/socket.c:2699
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57
 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556
 __call_rcu_common kernel/rcu/tree.c:3131 [inline]
 call_rcu+0xee/0x890 kernel/rcu/tree.c:3251
 task_work_run+0x1d4/0x260 kernel/task_work.c:233
 exit_task_work include/linux/task_work.h:40 [inline]
 do_exit+0x694/0x22f0 kernel/exit.c:971
 do_group_exit+0x21c/0x2d0 kernel/exit.c:1112
 get_signal+0x1285/0x1340 kernel/signal.c:3034
 arch_do_signal_or_restart+0x9a/0x7a0 arch/x86/kernel/signal.c:337
 __exit_to_user_mode_loop kernel/entry/common.c:41 [inline]
 exit_to_user_mode_loop+0x87/0x4e0 kernel/entry/common.c:75
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
 do_syscall_64+0x2c1/0xf80 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Second to last potentially related work creation:
 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57
 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556
 task_work_add+0xb1/0x440 kernel/task_work.c:70
 mntput_no_expire_slowpath+0x710/0xbe0 fs/namespace.c:1379
 mntput fs/namespace.c:1416 [inline]
 namespace_unlock+0x6ca/0x760 fs/namespace.c:1713
 nsproxy_free kernel/nsproxy.c:65 [inline]
 deactivate_nsproxy+0x41/0x140 kernel/nsproxy.c:79
 do_exit+0x68f/0x22f0 kernel/exit.c:970
 do_group_exit+0x21c/0x2d0 kernel/exit.c:1112
 get_signal+0x1285/0x1340 kernel/signal.c:3034
 arch_do_signal_or_restart+0x9a/0x7a0 arch/x86/kernel/signal.c:337
 __exit_to_user_mode_loop kernel/entry/common.c:41 [inline]
 exit_to_user_mode_loop+0x87/0x4e0 kernel/entry/common.c:75
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
 do_syscall_64+0x2c1/0xf80 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff88801bedb880
 which belongs to the cache mnt_cache of size 352
The buggy address is located 192 bytes inside of
 freed 352-byte region [ffff88801bedb880, ffff88801bedb9e0)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1beda
head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff8880349e7301
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff888140415280 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800120012 00000000f5000000 ffff8880349e7301
head: 00fff00000000040 ffff888140415280 dead000000000100 dead000000000122
head: 0000000000000000 0000000800120012 00000000f5000000 ffff8880349e7301
head: 00fff00000000001 ffffea00006fb681 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd2000(__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 0, tgid 0 (swapper/0), ts 2130404889, free_ts 0
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x23d/0x2a0 mm/page_alloc.c:1883
 prep_new_page mm/page_alloc.c:1891 [inline]
 get_page_from_freelist+0x24e0/0x2580 mm/page_alloc.c:3956
 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5244
 alloc_slab_page mm/slub.c:3195 [inline]
 allocate_slab+0x7b/0x670 mm/slub.c:3368
 new_slab mm/slub.c:3426 [inline]
 refill_objects+0x343/0x3e0 mm/slub.c:7002
 refill_sheaf+0x29/0x50 mm/slub.c:2744
 alloc_full_sheaf mm/slub.c:2765 [inline]
 __pcs_replace_empty_main+0x3f2/0x620 mm/slub.c:4498
 alloc_from_pcs mm/slub.c:4591 [inline]
 slab_alloc_node mm/slub.c:4725 [inline]
 kmem_cache_alloc_noprof+0x37c/0x660 mm/slub.c:4747
 alloc_vfsmnt+0x23/0x420 fs/namespace.c:287
 vfs_create_mount+0x69/0x320 fs/namespace.c:1178
 fc_mount fs/namespace.c:1196 [inline]
 vfs_kern_mount+0x1cd/0x220 fs/namespace.c:1231
 kern_mount+0x43/0x90 fs/namespace.c:6236
 shmem_init+0x37/0x170 mm/shmem.c:5407
 mnt_init+0x192/0x200 fs/namespace.c:6218
 vfs_caches_init+0x22/0x30 fs/dcache.c:3318
 start_kernel+0x340/0x3d0 init/main.c:1192
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88801bedb800: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88801bedb880: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88801bedb900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                           ^
 ffff88801bedb980: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
 ffff88801bedba00: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/20 05:06 linux-next d08c85ac8894 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in clone_mnt
2026/01/15 07:37 linux-next 9b7977f9e39b d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in clone_mnt
2026/01/15 07:35 linux-next 9b7977f9e39b d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in clone_mnt
2026/01/20 00:48 linux-next d08c85ac8894 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: use-after-free Read in clone_mnt
* Struck through repros no longer work on HEAD.