================================================================== BUG: KASAN: use-after-free in mntput+0x91/0xa0 fs/namespace.c:1207 Read of size 4 at addr ffff88806441a124 by task syz-executor.3/15504 CPU: 1 PID: 15504 Comm: syz-executor.3 Not tainted 5.2.0-rc4 #18 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:188 __kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 mntput+0x91/0xa0 fs/namespace.c:1207 path_put+0x50/0x70 fs/namei.c:483 free_fs_struct+0x25/0x70 fs/fs_struct.c:91 exit_fs+0xf0/0x130 fs/fs_struct.c:108 do_exit+0x8e0/0x2fa0 kernel/exit.c:873 do_group_exit+0x135/0x370 kernel/exit.c:981 get_signal+0x471/0x24b0 kernel/signal.c:2640 do_signal+0x87/0x1900 arch/x86/kernel/signal.c:815 exit_to_usermode_loop+0x244/0x2c0 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:279 [inline] do_syscall_32_irqs_on arch/x86/entry/common.c:352 [inline] do_fast_syscall_32+0xb51/0xd7d arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7fc7849 Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f5da212c EFLAGS: 00000292 ORIG_RAX: 00000000000000f0 RAX: fffffffffffffe00 RBX: 000000000816aff4 RCX: 0000000000000080 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000816aff8 RBP: 00000000f5da2228 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 15504: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:497 slab_post_alloc_hook mm/slab.h:437 [inline] slab_alloc mm/slab.c:3326 [inline] kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3488 kmem_cache_zalloc include/linux/slab.h:732 [inline] alloc_vfsmnt+0x28/0x780 fs/namespace.c:182 vfs_create_mount+0x96/0x500 fs/namespace.c:961 __do_sys_fsmount fs/namespace.c:3423 [inline] __se_sys_fsmount fs/namespace.c:3340 [inline] __ia32_sys_fsmount+0x584/0xc80 fs/namespace.c:3340 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x27b/0xd7d arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 8926: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3432 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3698 free_vfsmnt+0x6f/0x90 fs/namespace.c:559 delayed_free_vfsmnt+0x16/0x20 fs/namespace.c:564 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2092 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2310 [inline] rcu_core+0xba5/0x1500 kernel/rcu/tree.c:2291 __do_softirq+0x25c/0x94c kernel/softirq.c:292 The buggy address belongs to the object at ffff88806441a000 which belongs to the cache mnt_cache of size 432 The buggy address is located 292 bytes inside of 432-byte region [ffff88806441a000, ffff88806441a1b0) The buggy address belongs to the page: page:ffffea0001910680 refcount:1 mapcount:0 mapping:ffff8880aa594940 index:0xffff88806441a400 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000278d8c8 ffffea0002296e48 ffff8880aa594940 raw: ffff88806441a400 ffff88806441a000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88806441a000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806441a080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88806441a100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88806441a180: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff88806441a200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================