RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020268100 RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 R13: 0000000000000074 R14: 00000000004c2d52 R15: 0000000000000038 ================================================================== BUG: KASAN: use-after-free in put_pid_ns+0x75/0x80 kernel/pid_namespace.c:202 Read of size 8 at addr ffff88805aee52d0 by task syz-executor.1/25830 CPU: 1 PID: 25830 Comm: syz-executor.1 Not tainted 4.14.172-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x13e/0x194 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1e2 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2ae mm/kasan/report.c:393 put_pid_ns+0x75/0x80 kernel/pid_namespace.c:202 free_nsproxy+0xf7/0x1f0 kernel/nsproxy.c:182 switch_task_namespaces+0x8f/0xb0 kernel/nsproxy.c:229 copy_process.part.0+0x3c67/0x6a70 kernel/fork.c:1971 copy_process kernel/fork.c:1586 [inline] _do_fork+0x180/0xc80 kernel/fork.c:2070 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45c4a9 RSP: 002b:00007fdac171ec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007fdac171f6d4 RCX: 000000000045c4a9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020268100 RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 R13: 0000000000000074 R14: 00000000004c2d52 R15: 0000000000000038 Allocated by task 25830: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529 kmem_cache_alloc+0x127/0x770 mm/slab.c:3552 kmem_cache_zalloc include/linux/slab.h:651 [inline] create_pid_namespace kernel/pid_namespace.c:116 [inline] copy_pid_ns+0x1b2/0xa70 kernel/pid_namespace.c:186 create_new_namespaces+0x25f/0x730 kernel/nsproxy.c:94 copy_namespaces+0x27b/0x310 kernel/nsproxy.c:165 copy_process.part.0+0x2603/0x6a70 kernel/fork.c:1774 copy_process kernel/fork.c:1586 [inline] _do_fork+0x180/0xc80 kernel/fork.c:2070 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 17: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x792/0x1190 kernel/rcu/tree.c:2946 __do_softirq+0x254/0x9bf kernel/softirq.c:288 The buggy address belongs to the object at ffff88805aee4a98 which belongs to the cache pid_namespace of size 2264 The buggy address is located 2104 bytes inside of 2264-byte region [ffff88805aee4a98, ffff88805aee5370) The buggy address belongs to the page: page:ffffea00016bb900 count:1 mapcount:0 mapping:ffff88805aee4140 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff88805aee4140 0000000000000000 0000000100000003 raw: ffffea00016db8a0 ffffea0000fb91a0 ffff8880a6fa7b40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88805aee5180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805aee5200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88805aee5280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805aee5300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff88805aee5380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc 00 00 ==================================================================