RDX: 9999999999999999 RSI: 0000000000000000 RDI: 0000000034420903 RBP: 000000000078bf00 R08: ffffffffffffffff R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 R13: 000000000000007c R14: 00000000004c353a R15: 00007f91bc22a6d4 ================================================================== BUG: KASAN: use-after-free in put_pid_ns+0xf7/0x110 kernel/pid_namespace.c:202 Read of size 8 at addr ffff8881c30cdae8 by task syz-executor.1/22731 CPU: 0 PID: 22731 Comm: syz-executor.1 Not tainted 4.14.184-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:0x45cba9 RSP: 002b:00007f91bc229c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00000000004db6e0 RCX: 000000000045cba9 RDX: 9999999999999999 RSI: 0000000000000000 RDI: 0000000034420903 RBP: 000000000078bf00 R08: ffffffffffffffff R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 R13: 000000000000007c R14: 00000000004c353a R15: 00007f91bc22a6d4 Allocated by task 22731: 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 0: 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 ffff8881c30cd2b0 which belongs to the cache pid_namespace of size 2264 The buggy address is located 2104 bytes inside of 2264-byte region [ffff8881c30cd2b0, ffff8881c30cdb88) The buggy address belongs to the page: page:ffffea00070c3300 count:1 mapcount:0 mapping:ffff8881c30cc000 index:0x0 compound_mapcount: 0 flags: 0x57ffe0000008100(slab|head) raw: 057ffe0000008100 ffff8881c30cc000 0000000000000000 0000000100000003 raw: ffffea00070d77a0 ffff88821942fe48 ffff88821942e500 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c30cd980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881c30cda00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881c30cda80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881c30cdb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881c30cdb80: fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================