syzkaller login: [ 43.704249] audit: type=1400 audit(1569148458.619:35): avc: denied { map } for pid=7567 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.47' (ECDSA) to the list of known hosts. executing program [ 62.580679] audit: type=1400 audit(1569148477.499:36): avc: denied { map } for pid=7579 comm="syz-executor396" path="/root/syz-executor396577325" dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 62.595805] FAULT_INJECTION: forcing a failure. [ 62.595805] name failslab, interval 1, probability 0, space 0, times 1 [ 62.619584] CPU: 1 PID: 7579 Comm: syz-executor396 Not tainted 4.19.75 #0 [ 62.626626] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 62.636065] Call Trace: [ 62.638656] dump_stack+0x172/0x1f0 [ 62.642398] should_fail.cold+0xa/0x1b [ 62.646303] ? fault_create_debugfs_attr+0x1e0/0x1e0 [ 62.651594] ? lock_downgrade+0x810/0x810 [ 62.655767] __should_failslab+0x121/0x190 [ 62.660007] should_failslab+0x9/0x14 [ 62.663811] kmem_cache_alloc+0x2ae/0x700 [ 62.667954] ? save_stack+0xa9/0xd0 [ 62.671822] radix_tree_node_alloc.constprop.0+0x82/0x340 [ 62.677473] idr_get_free+0x50f/0xa13 [ 62.681275] idr_alloc_u32+0x1d6/0x390 [ 62.685220] ? __fprop_inc_percpu_max+0x230/0x230 [ 62.690096] ? cma_pernet_idr+0x13f/0x2e0 [ 62.694242] ? find_held_lock+0x35/0x130 [ 62.698316] ? cma_pernet_idr+0x13f/0x2e0 [ 62.702469] idr_alloc+0xe5/0x150 [ 62.705907] ? idr_alloc_u32+0x390/0x390 [ 62.709972] ? kasan_check_read+0x11/0x20 [ 62.714127] ? __sanitizer_cov_trace_switch+0x49/0x80 [ 62.719338] cma_alloc_port+0xab/0x190 [ 62.723225] rdma_bind_addr+0x165a/0x1f80 [ 62.727360] ? ucma_get_ctx+0x82/0x160 [ 62.731240] ? cma_ndev_work_handler+0x1b0/0x1b0 [ 62.736004] ? lock_downgrade+0x810/0x810 [ 62.740148] rdma_resolve_addr+0x438/0x2140 [ 62.744535] ? kasan_check_write+0x14/0x20 [ 62.748848] ? __mutex_unlock_slowpath+0xf8/0x6b0 [ 62.753699] ? lock_downgrade+0x810/0x810 [ 62.757847] ? __radix_tree_lookup+0x219/0x380 [ 62.762426] ? rdma_bind_addr+0x1f80/0x1f80 [ 62.766755] ucma_resolve_ip+0x153/0x210 [ 62.770811] ? ucma_query+0x820/0x820 [ 62.774623] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 62.780168] ? _copy_from_user+0xdd/0x150 [ 62.784329] ucma_write+0x2d7/0x3c0 [ 62.787945] ? ucma_query+0x820/0x820 [ 62.791839] ? ucma_open+0x290/0x290 [ 62.795545] __vfs_write+0x114/0x810 [ 62.799265] ? ucma_open+0x290/0x290 [ 62.803138] ? kernel_read+0x120/0x120 [ 62.807025] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 62.812575] ? __inode_security_revalidate+0xda/0x120 [ 62.817768] ? avc_policy_seqno+0xd/0x70 [ 62.821825] ? __sanitizer_cov_trace_cmp4+0x16/0x20 [ 62.826844] ? selinux_file_permission+0x92/0x550 [ 62.831691] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 62.837426] ? security_file_permission+0x89/0x230 [ 62.842380] ? rw_verify_area+0x118/0x360 [ 62.846677] vfs_write+0x20c/0x560 [ 62.850242] ksys_write+0x14f/0x2d0 [ 62.853943] ? __ia32_sys_read+0xb0/0xb0 [ 62.857997] ? do_syscall_64+0x26/0x620 [ 62.861962] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 62.867310] ? do_syscall_64+0x26/0x620 [ 62.871276] __x64_sys_write+0x73/0xb0 [ 62.875162] do_syscall_64+0xfd/0x620 [ 62.878962] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 62.884134] RIP: 0033:0x4406e9 [ 62.887311] Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 5b 14 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 62.906201] RSP: 002b:00007ffc28ae83d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 62.913896] RAX: ffffffffffffffda RBX: 00007ffc28ae83e0 RCX: 00000000004406e9 [ 62.921157] RDX: 0000000000000048 RSI: 00000000200000c0 RDI: 0000000000000003 [ 62.928414] RBP: 0000000000000004 R08: 0000000000000001 R09: 00007ffc28ae0032 [ 62.935671] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401fd0 [ 62.942940] R13: 0000000000402060 R14: 0000000000000000 R15: 0000000000000000 [ 62.953472] ================================================================== [ 62.961083] BUG: KASAN: use-after-free in wait_consider_task+0x1b51/0x3910 [ 62.968292] Read of size 4 at addr ffff88809381046c by task sshd/7577 [ 62.974859] [ 62.976483] CPU: 0 PID: 7577 Comm: sshd Not tainted 4.19.75 #0 [ 62.982455] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 62.991813] Call Trace: [ 62.994401] dump_stack+0x172/0x1f0 [ 62.998017] ? wait_consider_task+0x1b51/0x3910 [ 63.002674] print_address_description.cold+0x7c/0x20d [ 63.007944] ? wait_consider_task+0x1b51/0x3910 [ 63.012714] kasan_report.cold+0x8c/0x2ba [ 63.016880] __asan_report_load4_noabort+0x14/0x20 [ 63.021795] wait_consider_task+0x1b51/0x3910 [ 63.026285] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 63.031395] ? add_wait_queue+0x112/0x170 [ 63.035761] ? release_task+0x1630/0x1630 [ 63.039906] ? lock_acquire+0x16f/0x3f0 [ 63.043877] ? do_wait+0x3aa/0x9d0 [ 63.047417] ? kasan_check_write+0x14/0x20 [ 63.051652] do_wait+0x439/0x9d0 [ 63.055014] ? wait_consider_task+0x3910/0x3910 [ 63.059682] ? mark_held_locks+0x100/0x100 [ 63.063904] kernel_wait4+0x171/0x290 [ 63.067694] ? __ia32_sys_waitid+0x140/0x140 [ 63.072091] ? task_stopped_code+0x180/0x180 [ 63.076497] __do_sys_wait4+0x147/0x160 [ 63.080473] ? kernel_wait4+0x290/0x290 [ 63.084441] ? kasan_check_read+0x11/0x20 [ 63.088605] ? _copy_to_user+0xc9/0x120 [ 63.092570] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 63.098120] ? __x64_sys_rt_sigprocmask+0x21d/0x2e0 [ 63.103122] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 63.107871] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 63.112653] ? do_syscall_64+0x26/0x620 [ 63.116741] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 63.122129] ? do_syscall_64+0x26/0x620 [ 63.126110] __x64_sys_wait4+0x97/0xf0 [ 63.130202] do_syscall_64+0xfd/0x620 [ 63.134144] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 63.139336] RIP: 0033:0x7f88e83f1a3e [ 63.143225] 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 [ 63.162135] RSP: 002b:00007ffda5d3d930 EFLAGS: 00000246 ORIG_RAX: 000000000000003d [ 63.169854] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f88e83f1a3e [ 63.177345] RDX: 0000000000000001 RSI: 00007ffda5d3d96c RDI: ffffffffffffffff [ 63.184621] RBP: 0000559d4094ec88 R08: 00007ffda5d3da30 R09: 0101010101010101 [ 63.191894] R10: 0000000000000000 R11: 0000000000000246 R12: 0000559d40ebc9b0 [ 63.199181] R13: 0000559d4094cfb4 R14: 0000000000000028 R15: 0000559d4094eca0 [ 63.206472] [ 63.208115] Allocated by task 7577: [ 63.211772] save_stack+0x45/0xd0 [ 63.215233] kasan_kmalloc+0xce/0xf0 [ 63.219068] kasan_slab_alloc+0xf/0x20 [ 63.222946] kmem_cache_alloc_node+0x144/0x710 [ 63.227525] copy_process.part.0+0x1ce0/0x7a30 [ 63.232128] _do_fork+0x257/0xfd0 [ 63.235587] __x64_sys_clone+0xbf/0x150 [ 63.239569] do_syscall_64+0xfd/0x620 [ 63.243356] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 63.248526] [ 63.250137] Freed by task 0: [ 63.253158] save_stack+0x45/0xd0 [ 63.256599] __kasan_slab_free+0x102/0x150 [ 63.260823] kasan_slab_free+0xe/0x10 [ 63.264620] kmem_cache_free+0x86/0x260 [ 63.269013] free_task+0xdd/0x120 [ 63.272449] __put_task_struct+0x20f/0x4c0 [ 63.276667] finish_task_switch+0x52b/0x780 [ 63.280980] __schedule+0x86e/0x1dc0 [ 63.284678] schedule_idle+0x58/0x80 [ 63.288382] do_idle+0x192/0x560 [ 63.291730] cpu_startup_entry+0xc8/0xe0 [ 63.295777] start_secondary+0x3e8/0x5b0 [ 63.299821] secondary_startup_64+0xa4/0xb0 [ 63.304122] [ 63.305734] The buggy address belongs to the object at ffff888093810000 [ 63.305734] which belongs to the cache task_struct of size 6080 [ 63.318478] The buggy address is located 1132 bytes inside of [ 63.318478] 6080-byte region [ffff888093810000, ffff8880938117c0) [ 63.330528] The buggy address belongs to the page: [ 63.335472] page:ffffea00024e0400 count:1 mapcount:0 mapping:ffff88812c26d800 index:0x0 compound_mapcount: 0 [ 63.345454] flags: 0x1fffc0000008100(slab|head) [ 63.350115] raw: 01fffc0000008100 ffffea00024b0d88 ffffea0002479508 ffff88812c26d800 [ 63.357987] raw: 0000000000000000 ffff888093810000 0000000100000001 0000000000000000 [ 63.365852] page dumped because: kasan: bad access detected [ 63.371722] [ 63.373347] Memory state around the buggy address: [ 63.378279] ffff888093810300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 63.385664] ffff888093810380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 63.393012] >ffff888093810400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 63.400359] ^ [ 63.407109] ffff888093810480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 63.414667] ffff888093810500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 63.422010] ================================================================== [ 63.429351] Disabling lock debugging due to kernel taint [ 63.434875] Kernel panic - not syncing: panic_on_warn set ... [ 63.434875] [ 63.442263] CPU: 0 PID: 7577 Comm: sshd Tainted: G B 4.19.75 #0 [ 63.449616] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 63.458975] Call Trace: [ 63.461559] dump_stack+0x172/0x1f0 [ 63.465177] ? wait_consider_task+0x1b51/0x3910 [ 63.469830] panic+0x263/0x507 [ 63.473006] ? __warn_printk+0xf3/0xf3 [ 63.476882] ? retint_kernel+0x2d/0x2d [ 63.480767] ? trace_hardirqs_on+0x5e/0x220 [ 63.485075] ? wait_consider_task+0x1b51/0x3910 [ 63.489747] kasan_end_report+0x47/0x4f [ 63.493724] kasan_report.cold+0xa9/0x2ba [ 63.498278] __asan_report_load4_noabort+0x14/0x20 [ 63.503203] wait_consider_task+0x1b51/0x3910 [ 63.507691] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 63.512785] ? add_wait_queue+0x112/0x170 [ 63.516924] ? release_task+0x1630/0x1630 [ 63.521136] ? lock_acquire+0x16f/0x3f0 [ 63.525120] ? do_wait+0x3aa/0x9d0 [ 63.528656] ? kasan_check_write+0x14/0x20 [ 63.532913] do_wait+0x439/0x9d0 [ 63.536281] ? wait_consider_task+0x3910/0x3910 [ 63.541041] ? mark_held_locks+0x100/0x100 [ 63.545289] kernel_wait4+0x171/0x290 [ 63.549084] ? __ia32_sys_waitid+0x140/0x140 [ 63.553483] ? task_stopped_code+0x180/0x180 [ 63.557897] __do_sys_wait4+0x147/0x160 [ 63.561865] ? kernel_wait4+0x290/0x290 [ 63.565848] ? kasan_check_read+0x11/0x20 [ 63.569984] ? _copy_to_user+0xc9/0x120 [ 63.573968] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 63.579497] ? __x64_sys_rt_sigprocmask+0x21d/0x2e0 [ 63.584501] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 63.589239] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 63.593975] ? do_syscall_64+0x26/0x620 [ 63.597942] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 63.603375] ? do_syscall_64+0x26/0x620 [ 63.607339] __x64_sys_wait4+0x97/0xf0 [ 63.611210] do_syscall_64+0xfd/0x620 [ 63.615021] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 63.620207] RIP: 0033:0x7f88e83f1a3e [ 63.623908] 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 [ 63.642795] RSP: 002b:00007ffda5d3d930 EFLAGS: 00000246 ORIG_RAX: 000000000000003d [ 63.650486] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f88e83f1a3e [ 63.657741] RDX: 0000000000000001 RSI: 00007ffda5d3d96c RDI: ffffffffffffffff [ 63.664996] RBP: 0000559d4094ec88 R08: 00007ffda5d3da30 R09: 0101010101010101 [ 63.672247] R10: 0000000000000000 R11: 0000000000000246 R12: 0000559d40ebc9b0 [ 63.679500] R13: 0000559d4094cfb4 R14: 0000000000000028 R15: 0000559d4094eca0 [ 63.688382] Kernel Offset: disabled [ 63.692059] Rebooting in 86400 seconds..