Subscription rejected, illegal request ================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:188 [inline] BUG: KASAN: use-after-free in atomic_read arch/x86/include/asm/atomic.h:27 [inline] BUG: KASAN: use-after-free in refcount_inc_not_zero+0x16e/0x180 lib/refcount.c:120 Read of size 4 at addr ffff8801be79ae40 by task syz-executor4/9808 CPU: 0 PID: 9808 Comm: syz-executor4 Not tainted 4.15.0-rc4-mm1+ #49 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Subscription rejected, illegal request Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:355 [inline] kasan_report+0x23b/0x360 mm/kasan/report.c:413 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:433 __read_once_size include/linux/compiler.h:188 [inline] atomic_read arch/x86/include/asm/atomic.h:27 [inline] refcount_inc_not_zero+0x16e/0x180 lib/refcount.c:120 refcount_inc+0x15/0x50 lib/refcount.c:153 get_ipc_ns include/linux/ipc_namespace.h:129 [inline] __get_ns_from_inode ipc/mqueue.c:110 [inline] mqueue_create_attr+0xd8/0x400 ipc/mqueue.c:446 mqueue_create+0x1e/0x30 ipc/mqueue.c:485 lookup_open+0x1217/0x1970 fs/namei.c:3218 do_last fs/namei.c:3309 [inline] path_openat+0xd76/0x3530 fs/namei.c:3537 do_filp_open+0x25b/0x3b0 fs/namei.c:3572 do_sys_open+0x502/0x6d0 fs/open.c:1059 SYSC_open fs/open.c:1077 [inline] SyS_open fs/open.c:1072 [inline] SYSC_creat fs/open.c:1117 [inline] SyS_creat+0x27/0x30 fs/open.c:1115 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452ac9 RSP: 002b:00007f7a744e5c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 000000000071bf58 RCX: 0000000000452ac9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020015ff4 RBP: 00000000000003f2 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f2f50 R13: 00000000ffffffff R14: 00007f7a744e66d4 R15: 0000000000000004 Allocated by task 9800: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x136/0x750 mm/slab.c:3607 kmalloc include/linux/slab.h:516 [inline] create_ipc_ns ipc/namespace.c:45 [inline] copy_ipcs+0x1b3/0x520 ipc/namespace.c:96 create_new_namespaces+0x278/0x880 kernel/nsproxy.c:87 unshare_nsproxy_namespaces+0xae/0x1e0 kernel/nsproxy.c:206 SYSC_unshare kernel/fork.c:2421 [inline] SyS_unshare+0x653/0xfa0 kernel/fork.c:2371 entry_SYSCALL_64_fastpath+0x1f/0x96 Freed by task 9800: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3485 [inline] kfree+0xd6/0x260 mm/slab.c:3800 free_ipc_ns ipc/namespace.c:139 [inline] put_ipc_ns+0x112/0x150 ipc/namespace.c:164 free_nsproxy+0xc0/0x1f0 kernel/nsproxy.c:180 switch_task_namespaces+0x9d/0xc0 kernel/nsproxy.c:229 SYSC_unshare kernel/fork.c:2440 [inline] SyS_unshare+0x738/0xfa0 kernel/fork.c:2371 entry_SYSCALL_64_fastpath+0x1f/0x96 The buggy address belongs to the object at ffff8801be79ae40 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 0 bytes inside of 2048-byte region [ffff8801be79ae40, ffff8801be79b640) The buggy address belongs to the page: page:ffffea0006f9e680 count:1 mapcount:0 mapping:ffff8801be79a5c0 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801be79a5c0 0000000000000000 0000000100000003 raw: ffffea0006f97e20 ffffea0006f81120 ffff8801dac00c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801be79ad00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801be79ad80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8801be79ae00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8801be79ae80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801be79af00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================