RDX: 9999999999999999 RSI: 0000000000000000 RDI: 0000000024221500 RBP: 000000000078c0e0 R08: ffffffffffffffff R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006 R13: 0000000000000076 R14: 00000000004c335e R15: 00007f11478626d4 ================================================================== BUG: KASAN: use-after-free in put_pid_ns+0xf7/0x110 kernel/pid_namespace.c:202 Read of size 8 at addr ffff888037c27290 by task syz-executor.2/1146 CPU: 1 PID: 1146 Comm: syz-executor.2 Not tainted 4.14.182-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+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1dc 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/0x2b9 mm/kasan/report.c:393 put_pid_ns+0xf7/0x110 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+0x3f47/0x6fa0 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+0x46/0xbb RIP: 0033:0x45ca69 RSP: 002b:00007f1147861c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00000000004dac00 RCX: 000000000045ca69 RDX: 9999999999999999 RSI: 0000000000000000 RDI: 0000000024221500 RBP: 000000000078c0e0 R08: ffffffffffffffff R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006 R13: 0000000000000076 R14: 00000000004c335e R15: 00007f11478626d4 Allocated by task 1146: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.0+0x4f/0xd0 mm/kasan/kasan.c:551 kmem_cache_alloc+0x124/0x3c0 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+0x2616/0x6fa0 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+0x46/0xbb Freed by task 6345: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xaf/0x190 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+0x78d/0x1180 kernel/rcu/tree.c:2946 __do_softirq+0x254/0x9bf kernel/softirq.c:288 The buggy address belongs to the object at ffff888037c26a58 which belongs to the cache pid_namespace of size 2264 The buggy address is located 2104 bytes inside of 2264-byte region [ffff888037c26a58, ffff888037c27330) The buggy address belongs to the page: page:ffffea0000df0980 count:1 mapcount:0 mapping:ffff888037c26100 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff888037c26100 0000000000000000 0000000100000003 raw: ffffea00025b76a0 ffffea00026f22a0 ffff88821aa86940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888037c27180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888037c27200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888037c27280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888037c27300: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff888037c27380: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 ==================================================================