================================================================== BUG: KASAN: use-after-free in mntput+0x69/0x70 fs/namespace.c:1207 Read of size 4 at addr ffff88808c396724 by task syz-executor.0/7138 CPU: 1 PID: 7138 Comm: syz-executor.0 Not tainted 5.1.0+ #1 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+0x113/0x167 lib/dump_stack.c:113 print_address_description.cold.5+0x9/0x1ff mm/kasan/report.c:188 __kasan_report.cold.6+0x1b/0x39 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+0x69/0x70 fs/namespace.c:1207 path_put+0x4b/0x60 fs/namei.c:483 free_fs_struct+0x1d/0x60 fs/fs_struct.c:90 exit_fs+0xcc/0x100 fs/fs_struct.c:107 do_exit+0x9b0/0x2e80 kernel/exit.c:872 do_group_exit+0xf4/0x2f0 kernel/exit.c:980 get_signal+0x2e7/0x1840 kernel/signal.c:2577 do_signal+0x87/0x1940 arch/x86/kernel/signal.c:815 exit_to_usermode_loop+0x114/0x200 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:276 [inline] do_syscall_32_irqs_on arch/x86/entry/common.c:349 [inline] do_fast_syscall_32+0x8c0/0xae6 arch/x86/entry/common.c:405 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f68839 Code: Bad RIP value. RSP: 002b:00000000f7f6412c EFLAGS: 00000292 ORIG_RAX: 00000000000000f0 RAX: fffffffffffffe00 RBX: 000000000816af88 RCX: 0000000000000080 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000816af8c RBP: 00000000f7f64228 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 7138: save_stack+0x21/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc.constprop.8+0xc7/0xd0 mm/kasan/common.c:489 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:497 slab_post_alloc_hook mm/slab.h:437 [inline] slab_alloc mm/slab.c:3357 [inline] kmem_cache_alloc+0x11a/0x720 mm/slab.c:3519 kmem_cache_zalloc include/linux/slab.h:732 [inline] alloc_vfsmnt+0x21/0x710 fs/namespace.c:182 vfs_create_mount+0x8a/0x4b0 fs/namespace.c:961 __do_sys_fsmount fs/namespace.c:3423 [inline] __se_sys_fsmount fs/namespace.c:3340 [inline] __ia32_sys_fsmount+0x418/0xc60 fs/namespace.c:3340 do_syscall_32_irqs_on arch/x86/entry/common.c:334 [inline] do_fast_syscall_32+0x235/0xae6 arch/x86/entry/common.c:405 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 9: save_stack+0x21/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:3463 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3729 free_vfsmnt+0x62/0x80 fs/namespace.c:559 delayed_free_vfsmnt+0xd/0x10 fs/namespace.c:564 __rcu_reclaim kernel/rcu/rcu.h:227 [inline] rcu_do_batch kernel/rcu/tree.c:2092 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2310 [inline] rcu_core+0x954/0x1350 kernel/rcu/tree.c:2291 __do_softirq+0x260/0x958 kernel/softirq.c:293 The buggy address belongs to the object at ffff88808c396600 which belongs to the cache mnt_cache of size 432 The buggy address is located 292 bytes inside of 432-byte region [ffff88808c396600, ffff88808c3967b0) The buggy address belongs to the page: page:ffffea000230e580 count:1 mapcount:0 mapping:ffff8880aa595ac0 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000230d7c8 ffffea00027f5b88 ffff8880aa595ac0 raw: 0000000000000000 ffff88808c396000 0000000100000008 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808c396600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808c396680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808c396700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808c396780: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff88808c396800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================