syzkaller login: [ 41.787162] audit: type=1400 audit(1569111841.663:35): avc: denied { map } for pid=7440 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 Warning: Permanently added '10.128.0.33' (ECDSA) to the list of known hosts. executing program [ 48.238962] audit: type=1400 audit(1569111848.123:36): avc: denied { map } for pid=7452 comm="syz-executor366" path="/root/syz-executor366178879" dev="sda1" ino=16484 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 48.271408] ================================================================== [ 48.278922] BUG: KASAN: use-after-free in wait_consider_task+0x1b51/0x3910 [ 48.285951] Read of size 4 at addr ffff888085e4c8ac by task sshd/7450 [ 48.292527] [ 48.294171] CPU: 0 PID: 7450 Comm: sshd Not tainted 4.19.75 #0 [ 48.300125] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.309519] Call Trace: [ 48.312100] dump_stack+0x172/0x1f0 [ 48.315720] ? wait_consider_task+0x1b51/0x3910 [ 48.320416] print_address_description.cold+0x7c/0x20d [ 48.325709] ? wait_consider_task+0x1b51/0x3910 [ 48.330378] kasan_report.cold+0x8c/0x2ba [ 48.334556] __asan_report_load4_noabort+0x14/0x20 [ 48.339471] wait_consider_task+0x1b51/0x3910 [ 48.344057] ? mark_held_locks+0x100/0x100 [ 48.348283] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 48.353375] ? add_wait_queue+0x112/0x170 [ 48.357511] ? release_task+0x1630/0x1630 [ 48.361640] ? lock_acquire+0x16f/0x3f0 [ 48.365611] ? do_wait+0x3aa/0x9d0 [ 48.369137] ? kasan_check_write+0x14/0x20 [ 48.373359] do_wait+0x439/0x9d0 [ 48.376711] ? wait_consider_task+0x3910/0x3910 [ 48.381366] ? mark_held_locks+0x100/0x100 [ 48.385592] kernel_wait4+0x171/0x290 [ 48.389381] ? __ia32_sys_waitid+0x140/0x140 [ 48.393862] ? task_stopped_code+0x180/0x180 [ 48.398316] __do_sys_wait4+0x147/0x160 [ 48.403615] ? kernel_wait4+0x290/0x290 [ 48.407581] ? kasan_check_read+0x11/0x20 [ 48.411719] ? _copy_to_user+0xc9/0x120 [ 48.415743] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 48.421289] ? __x64_sys_rt_sigprocmask+0x21d/0x2e0 [ 48.426306] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 48.431050] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 48.435793] ? do_syscall_64+0x26/0x620 [ 48.439762] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.445128] ? do_syscall_64+0x26/0x620 [ 48.449092] __x64_sys_wait4+0x97/0xf0 [ 48.452964] do_syscall_64+0xfd/0x620 [ 48.456750] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.461922] RIP: 0033:0x7f95c8431a3e [ 48.465706] Code: 90 90 90 90 90 90 90 90 90 90 90 90 48 83 ec 28 8b 05 c2 eb 2d 00 85 c0 75 1d 45 31 d2 48 63 d2 48 63 ff b8 3d 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 55 48 83 c4 28 c3 89 54 24 08 48 89 74 24 10 [ 48.484800] RSP: 002b:00007ffc1a7e2dd0 EFLAGS: 00000246 ORIG_RAX: 000000000000003d [ 48.492507] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f95c8431a3e [ 48.499827] RDX: 0000000000000001 RSI: 00007ffc1a7e2e0c RDI: ffffffffffffffff [ 48.507090] RBP: 00005630c590ac88 R08: 00007ffc1a7e2ed0 R09: 0101010101010101 [ 48.514349] R10: 0000000000000000 R11: 0000000000000246 R12: 00005630c5d98db0 [ 48.521694] R13: 00005630c5908fb4 R14: 0000000000000028 R15: 00005630c590aca0 [ 48.528972] [ 48.530596] Allocated by task 7450: [ 48.534230] save_stack+0x45/0xd0 [ 48.537667] kasan_kmalloc+0xce/0xf0 [ 48.541365] kasan_slab_alloc+0xf/0x20 [ 48.545668] kmem_cache_alloc_node+0x144/0x710 [ 48.550244] copy_process.part.0+0x1ce0/0x7a30 [ 48.554808] _do_fork+0x257/0xfd0 [ 48.558253] __x64_sys_clone+0xbf/0x150 [ 48.562223] do_syscall_64+0xfd/0x620 [ 48.566022] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.571189] [ 48.572809] Freed by task 7450: [ 48.576086] save_stack+0x45/0xd0 [ 48.579524] __kasan_slab_free+0x102/0x150 [ 48.583749] kasan_slab_free+0xe/0x10 [ 48.587642] kmem_cache_free+0x86/0x260 [ 48.591613] free_task+0xdd/0x120 [ 48.595065] __put_task_struct+0x20f/0x4c0 [ 48.599289] finish_task_switch+0x52b/0x780 [ 48.603602] __schedule+0x86e/0x1dc0 [ 48.607832] schedule+0x92/0x1c0 [ 48.611195] schedule_hrtimeout_range_clock+0x1b1/0x380 [ 48.616543] schedule_hrtimeout_range+0x2b/0x40 [ 48.621198] poll_schedule_timeout.constprop.0+0x11a/0x200 [ 48.626805] do_select+0x12bd/0x16d0 [ 48.630501] core_sys_select+0x564/0x870 [ 48.634558] kern_select+0x15d/0x1e0 [ 48.638266] __x64_sys_select+0xbe/0x150 [ 48.642311] do_syscall_64+0xfd/0x620 [ 48.646092] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.651271] [ 48.652901] The buggy address belongs to the object at ffff888085e4c440 [ 48.652901] which belongs to the cache task_struct of size 6080 [ 48.665631] The buggy address is located 1132 bytes inside of [ 48.665631] 6080-byte region [ffff888085e4c440, ffff888085e4dc00) [ 48.677661] The buggy address belongs to the page: [ 48.682587] page:ffffea0002179300 count:1 mapcount:0 mapping:ffff88812c26d800 index:0x0 compound_mapcount: 0 [ 48.692542] flags: 0x1fffc0000008100(slab|head) [ 48.697198] raw: 01fffc0000008100 ffffea00027ecc08 ffffea00027e7988 ffff88812c26d800 [ 48.705414] raw: 0000000000000000 ffff888085e4c440 0000000100000001 0000000000000000 [ 48.713274] page dumped because: kasan: bad access detected [ 48.718976] [ 48.720587] Memory state around the buggy address: [ 48.725512] ffff888085e4c780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.732856] ffff888085e4c800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.740211] >ffff888085e4c880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.747996] ^ [ 48.752644] ffff888085e4c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.759986] ffff888085e4c980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.767336] ================================================================== [ 48.774682] Disabling lock debugging due to kernel taint [ 48.780602] Kernel panic - not syncing: panic_on_warn set ... [ 48.780602] [ 48.787985] CPU: 0 PID: 7450 Comm: sshd Tainted: G B 4.19.75 #0 [ 48.795858] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.805195] Call Trace: [ 48.807769] dump_stack+0x172/0x1f0 [ 48.811382] ? wait_consider_task+0x1b51/0x3910 [ 48.816034] panic+0x263/0x507 [ 48.819211] ? __warn_printk+0xf3/0xf3 [ 48.823343] ? retint_kernel+0x2d/0x2d [ 48.827215] ? trace_hardirqs_on+0x5e/0x220 [ 48.831521] ? wait_consider_task+0x1b51/0x3910 [ 48.836173] kasan_end_report+0x47/0x4f [ 48.840134] kasan_report.cold+0xa9/0x2ba [ 48.844268] __asan_report_load4_noabort+0x14/0x20 [ 48.849269] wait_consider_task+0x1b51/0x3910 [ 48.853750] ? mark_held_locks+0x100/0x100 [ 48.857971] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 48.863068] ? add_wait_queue+0x112/0x170 [ 48.867199] ? release_task+0x1630/0x1630 [ 48.872282] ? lock_acquire+0x16f/0x3f0 [ 48.876250] ? do_wait+0x3aa/0x9d0 [ 48.879776] ? kasan_check_write+0x14/0x20 [ 48.884001] do_wait+0x439/0x9d0 [ 48.887373] ? wait_consider_task+0x3910/0x3910 [ 48.892026] ? mark_held_locks+0x100/0x100 [ 48.896245] kernel_wait4+0x171/0x290 [ 48.900031] ? __ia32_sys_waitid+0x140/0x140 [ 48.904438] ? task_stopped_code+0x180/0x180 [ 48.908834] __do_sys_wait4+0x147/0x160 [ 48.912789] ? kernel_wait4+0x290/0x290 [ 48.916751] ? kasan_check_read+0x11/0x20 [ 48.920882] ? _copy_to_user+0xc9/0x120 [ 48.924851] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 48.930387] ? __x64_sys_rt_sigprocmask+0x21d/0x2e0 [ 48.935389] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 48.940128] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 48.944866] ? do_syscall_64+0x26/0x620 [ 48.948825] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.954199] ? do_syscall_64+0x26/0x620 [ 48.958159] __x64_sys_wait4+0x97/0xf0 [ 48.962030] do_syscall_64+0xfd/0x620 [ 48.965816] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.971004] RIP: 0033:0x7f95c8431a3e [ 48.974702] Code: 90 90 90 90 90 90 90 90 90 90 90 90 48 83 ec 28 8b 05 c2 eb 2d 00 85 c0 75 1d 45 31 d2 48 63 d2 48 63 ff b8 3d 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 55 48 83 c4 28 c3 89 54 24 08 48 89 74 24 10 [ 48.993599] RSP: 002b:00007ffc1a7e2dd0 EFLAGS: 00000246 ORIG_RAX: 000000000000003d [ 49.001303] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f95c8431a3e [ 49.008562] RDX: 0000000000000001 RSI: 00007ffc1a7e2e0c RDI: ffffffffffffffff [ 49.015812] RBP: 00005630c590ac88 R08: 00007ffc1a7e2ed0 R09: 0101010101010101 [ 49.023064] R10: 0000000000000000 R11: 0000000000000246 R12: 00005630c5d98db0 [ 49.030329] R13: 00005630c5908fb4 R14: 0000000000000028 R15: 00005630c590aca0 [ 49.039114] Kernel Offset: disabled [ 49.042770] Rebooting in 86400 seconds..