[ 37.449654][ T26] audit: type=1800 audit(1549031821.002:27): pid=7662 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 37.484726][ T26] audit: type=1800 audit(1549031821.072:28): pid=7662 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="ssh" dev="sda1" ino=2417 res=0 [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 38.495429][ T26] audit: type=1800 audit(1549031822.082:29): pid=7662 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 38.515489][ T26] audit: type=1800 audit(1549031822.092:30): pid=7662 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.178' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 57.704490][ T7819] [ 57.706858][ T7819] ====================================================== [ 57.713850][ T7819] WARNING: possible circular locking dependency detected [ 57.720842][ T7819] 5.0.0-rc4-next-20190201 #24 Not tainted [ 57.726528][ T7819] ------------------------------------------------------ [ 57.733523][ T7819] syz-executor330/7819 is trying to acquire lock: [ 57.739909][ T7819] 0000000001db0c5e (&mm->mmap_sem){++++}, at: __do_page_fault+0x9e9/0xda0 [ 57.748522][ T7819] [ 57.748522][ T7819] but task is already holding lock: [ 57.755864][ T7819] 0000000005a01b32 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 57.766176][ T7819] [ 57.766176][ T7819] which lock already depends on the new lock. [ 57.766176][ T7819] [ 57.776560][ T7819] [ 57.776560][ T7819] the existing dependency chain (in reverse order) is: [ 57.785556][ T7819] [ 57.785556][ T7819] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 57.793797][ T7819] down_write+0x38/0x90 [ 57.798456][ T7819] shmem_fallocate+0x15a/0xc60 [ 57.803731][ T7819] ashmem_shrink_scan+0x1d7/0x4f0 [ 57.809295][ T7819] ashmem_ioctl+0x2f0/0x11a0 [ 57.814399][ T7819] do_vfs_ioctl+0xd6e/0x1390 [ 57.819485][ T7819] ksys_ioctl+0xab/0xd0 [ 57.824148][ T7819] __x64_sys_ioctl+0x73/0xb0 [ 57.829260][ T7819] do_syscall_64+0x103/0x610 [ 57.834347][ T7819] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 57.840724][ T7819] [ 57.840724][ T7819] -> #1 (ashmem_mutex){+.+.}: [ 57.847554][ T7819] __mutex_lock+0xf7/0x1310 [ 57.852550][ T7819] mutex_lock_nested+0x16/0x20 [ 57.857809][ T7819] ashmem_mmap+0x55/0x520 [ 57.862646][ T7819] mmap_region+0xc3a/0x1770 [ 57.867767][ T7819] do_mmap+0x8e2/0x1080 [ 57.872418][ T7819] vm_mmap_pgoff+0x1c5/0x230 [ 57.877501][ T7819] ksys_mmap_pgoff+0x4aa/0x630 [ 57.882755][ T7819] __x64_sys_mmap+0xe9/0x1b0 [ 57.887840][ T7819] do_syscall_64+0x103/0x610 [ 57.893074][ T7819] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 57.899457][ T7819] [ 57.899457][ T7819] -> #0 (&mm->mmap_sem){++++}: [ 57.906388][ T7819] lock_acquire+0x16f/0x3f0 [ 57.911385][ T7819] down_read+0x3b/0x90 [ 57.916034][ T7819] __do_page_fault+0x9e9/0xda0 [ 57.921297][ T7819] do_page_fault+0x71/0x581 [ 57.926301][ T7819] page_fault+0x1e/0x30 [ 57.930951][ T7819] iov_iter_fault_in_readable+0x377/0x450 [ 57.937166][ T7819] generic_perform_write+0x195/0x530 [ 57.942945][ T7819] __generic_file_write_iter+0x25e/0x630 [ 57.949069][ T7819] generic_file_write_iter+0x360/0x610 [ 57.955023][ T7819] __vfs_write+0x613/0x8e0 [ 57.960009][ T7819] vfs_write+0x20c/0x580 [ 57.964752][ T7819] ksys_write+0xea/0x1f0 [ 57.969600][ T7819] __x64_sys_write+0x73/0xb0 [ 57.974718][ T7819] do_syscall_64+0x103/0x610 [ 57.979801][ T7819] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 57.986186][ T7819] [ 57.986186][ T7819] other info that might help us debug this: [ 57.986186][ T7819] [ 57.996387][ T7819] Chain exists of: [ 57.996387][ T7819] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 57.996387][ T7819] [ 58.009983][ T7819] Possible unsafe locking scenario: [ 58.009983][ T7819] [ 58.017482][ T7819] CPU0 CPU1 [ 58.022827][ T7819] ---- ---- [ 58.028160][ T7819] lock(&sb->s_type->i_mutex_key#12); [ 58.033600][ T7819] lock(ashmem_mutex); [ 58.040239][ T7819] lock(&sb->s_type->i_mutex_key#12); [ 58.048185][ T7819] lock(&mm->mmap_sem); [ 58.052399][ T7819] [ 58.052399][ T7819] *** DEADLOCK *** [ 58.052399][ T7819] [ 58.060522][ T7819] 2 locks held by syz-executor330/7819: [ 58.066035][ T7819] #0: 0000000037ef696c (sb_writers#5){.+.+}, at: vfs_write+0x429/0x580 [ 58.074347][ T7819] #1: 0000000005a01b32 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 58.085086][ T7819] [ 58.085086][ T7819] stack backtrace: [ 58.091055][ T7819] CPU: 0 PID: 7819 Comm: syz-executor330 Not tainted 5.0.0-rc4-next-20190201 #24 [ 58.100135][ T7819] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 58.110164][ T7819] Call Trace: [ 58.113438][ T7819] dump_stack+0x172/0x1f0 [ 58.117760][ T7819] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 58.123824][ T7819] __lock_acquire+0x2e7a/0x4790 [ 58.128650][ T7819] ? mark_held_locks+0xf0/0xf0 [ 58.133386][ T7819] ? __lock_is_held+0xb6/0x140 [ 58.138120][ T7819] lock_acquire+0x16f/0x3f0 [ 58.142603][ T7819] ? __do_page_fault+0x9e9/0xda0 [ 58.147515][ T7819] down_read+0x3b/0x90 [ 58.151558][ T7819] ? __do_page_fault+0x9e9/0xda0 [ 58.156469][ T7819] __do_page_fault+0x9e9/0xda0 [ 58.161242][ T7819] ? trace_hardirqs_off_caller+0x65/0x220 [ 58.166939][ T7819] do_page_fault+0x71/0x581 [ 58.171418][ T7819] page_fault+0x1e/0x30 [ 58.175551][ T7819] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 58.182025][ T7819] Code: 89 f6 41 88 57 e0 e8 d8 28 48 fe 45 85 f6 74 c1 e9 70 fe ff ff e8 49 27 48 fe 0f 1f 00 0f ae e8 44 89 f0 48 8b 8d 68 ff ff ff <8a> 11 89 c3 0f 1f 00 41 88 57 d0 31 ff 89 de e8 a5 28 48 fe 85 db [ 58.201673][ T7819] RSP: 0018:ffff88808bda79b8 EFLAGS: 00010293 [ 58.207896][ T7819] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020ed1c3f [ 58.215839][ T7819] RDX: 0000000000000000 RSI: ffffffff8327d447 RDI: 0000000000000007 [ 58.223785][ T7819] RBP: ffff88808bda7a58 R08: ffff888096596440 R09: fffff9400041e9c7 [ 58.231737][ T7819] R10: fffff9400041e9c6 R11: ffffea00020f4e37 R12: 0000000000001000 [ 58.239696][ T7819] R13: 0000000000001000 R14: 0000000000000000 R15: ffff88808bda7a30 [ 58.247666][ T7819] ? iov_iter_fault_in_readable+0x367/0x450 [ 58.253551][ T7819] ? iov_iter_fault_in_readable+0x367/0x450 [ 58.259423][ T7819] ? csum_and_copy_to_iter+0x15c0/0x15c0 [ 58.265103][ T7819] generic_perform_write+0x195/0x530 [ 58.270373][ T7819] ? page_endio+0x780/0x780 [ 58.274866][ T7819] ? current_time+0x140/0x140 [ 58.279518][ T7819] ? lock_acquire+0x16f/0x3f0 [ 58.284272][ T7819] __generic_file_write_iter+0x25e/0x630 [ 58.289920][ T7819] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 58.295614][ T7819] generic_file_write_iter+0x360/0x610 [ 58.301116][ T7819] ? __generic_file_write_iter+0x630/0x630 [ 58.306905][ T7819] ? __fget+0x340/0x540 [ 58.311161][ T7819] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 58.317395][ T7819] ? iov_iter_init+0xea/0x220 [ 58.322062][ T7819] __vfs_write+0x613/0x8e0 [ 58.326460][ T7819] ? kernel_read+0x120/0x120 [ 58.331027][ T7819] ? rcu_read_lock_sched_held+0x110/0x130 [ 58.336720][ T7819] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 58.342319][ T7819] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 58.348580][ T7819] ? __sb_start_write+0x1ac/0x360 [ 58.353576][ T7819] vfs_write+0x20c/0x580 [ 58.357793][ T7819] ksys_write+0xea/0x1f0 [ 58.362016][ T7819] ? __ia32_sys_read+0xb0/0xb0 [ 58.366752][ T7819] ? do_syscall_64+0x26/0x610 [ 58.371402][ T7819] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 58.377441][ T7819] ? do_syscall_64+0x26/0x610 [ 58.382095][ T7819] __x64_sys_write+0x73/0xb0 [ 58.386659][ T7819] do_syscall_64+0x103/0x610 [ 58.391225][ T7819] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 58.397093][ T7819] RIP: 0033:0x4463d9 [ 58.400962][ T7819] Code: e8 2c b3 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 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 2b 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 58.420543][ T7819] RSP: 002b:00007f54c06feda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 58.428927][ T7819] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 00000000004463d9 [ 58.437009][ T7819] RDX: 00000000fffffe43 RSI: 0000000020000c40 RDI: 0000000000000004 [ 58.445086][ T7819] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 executing program [ 58.453036][ T7819] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c [ 58.460982][ T7819] R13: 0000000000000000 R14: 0080000080000000 R15: 20c49ba5e353f7cf executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program