[ 31.153087][ T26] audit: type=1800 audit(1549182433.595:27): pid=7221 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 31.179865][ T26] audit: type=1800 audit(1549182433.595:28): pid=7221 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. [ 32.025934][ T26] audit: type=1800 audit(1549182434.505:29): pid=7221 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 [ 32.046028][ T26] audit: type=1800 audit(1549182434.505:30): pid=7221 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.165' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 343.871124][ T7375] [ 343.873496][ T7375] ====================================================== [ 343.880487][ T7375] WARNING: possible circular locking dependency detected [ 343.887477][ T7375] 5.0.0-rc4-next-20190201 #25 Not tainted [ 343.893286][ T7375] ------------------------------------------------------ [ 343.900279][ T7375] syz-executor972/7375 is trying to acquire lock: [ 343.906665][ T7375] 00000000010373a0 (&mm->mmap_sem){++++}, at: __do_page_fault+0x9e9/0xda0 [ 343.915147][ T7375] [ 343.915147][ T7375] but task is already holding lock: [ 343.922670][ T7375] 000000004db6d77d (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 343.932977][ T7375] [ 343.932977][ T7375] which lock already depends on the new lock. [ 343.932977][ T7375] [ 343.943450][ T7375] [ 343.943450][ T7375] the existing dependency chain (in reverse order) is: [ 343.952442][ T7375] [ 343.952442][ T7375] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 343.960679][ T7375] down_write+0x38/0x90 [ 343.965330][ T7375] shmem_fallocate+0x15a/0xc60 [ 343.970588][ T7375] ashmem_shrink_scan+0x1d7/0x4f0 [ 343.976105][ T7375] ashmem_ioctl+0x2f0/0x11a0 [ 343.981311][ T7375] do_vfs_ioctl+0xd6e/0x1390 [ 343.986397][ T7375] ksys_ioctl+0xab/0xd0 [ 343.991053][ T7375] __x64_sys_ioctl+0x73/0xb0 [ 343.996162][ T7375] do_syscall_64+0x103/0x610 [ 344.001400][ T7375] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 344.007785][ T7375] [ 344.007785][ T7375] -> #1 (ashmem_mutex){+.+.}: [ 344.014708][ T7375] __mutex_lock+0xf7/0x1310 [ 344.019719][ T7375] mutex_lock_nested+0x16/0x20 [ 344.024989][ T7375] ashmem_mmap+0x55/0x520 [ 344.029817][ T7375] mmap_region+0xc3a/0x1770 [ 344.034814][ T7375] do_mmap+0x8e2/0x1080 [ 344.039464][ T7375] vm_mmap_pgoff+0x1c5/0x230 [ 344.044549][ T7375] ksys_mmap_pgoff+0x4aa/0x630 [ 344.049812][ T7375] __x64_sys_mmap+0xe9/0x1b0 [ 344.054897][ T7375] do_syscall_64+0x103/0x610 [ 344.059981][ T7375] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 344.066513][ T7375] [ 344.066513][ T7375] -> #0 (&mm->mmap_sem){++++}: [ 344.073444][ T7375] lock_acquire+0x16f/0x3f0 [ 344.078442][ T7375] down_read+0x3b/0x90 [ 344.083003][ T7375] __do_page_fault+0x9e9/0xda0 [ 344.088259][ T7375] do_page_fault+0x71/0x581 [ 344.093274][ T7375] page_fault+0x1e/0x30 [ 344.097929][ T7375] iov_iter_fault_in_readable+0x377/0x450 [ 344.104145][ T7375] generic_perform_write+0x195/0x530 [ 344.109934][ T7375] __generic_file_write_iter+0x25e/0x630 [ 344.116070][ T7375] generic_file_write_iter+0x360/0x610 [ 344.122027][ T7375] __vfs_write+0x613/0x8e0 [ 344.126937][ T7375] vfs_write+0x20c/0x580 [ 344.131679][ T7375] ksys_write+0xea/0x1f0 [ 344.136413][ T7375] __x64_sys_write+0x73/0xb0 [ 344.141498][ T7375] do_syscall_64+0x103/0x610 [ 344.146595][ T7375] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 344.152988][ T7375] [ 344.152988][ T7375] other info that might help us debug this: [ 344.152988][ T7375] [ 344.163276][ T7375] Chain exists of: [ 344.163276][ T7375] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 344.163276][ T7375] [ 344.176871][ T7375] Possible unsafe locking scenario: [ 344.176871][ T7375] [ 344.184346][ T7375] CPU0 CPU1 [ 344.189693][ T7375] ---- ---- [ 344.195031][ T7375] lock(&sb->s_type->i_mutex_key#12); [ 344.200468][ T7375] lock(ashmem_mutex); [ 344.207113][ T7375] lock(&sb->s_type->i_mutex_key#12); [ 344.215061][ T7375] lock(&mm->mmap_sem); [ 344.219271][ T7375] [ 344.219271][ T7375] *** DEADLOCK *** [ 344.219271][ T7375] [ 344.227389][ T7375] 2 locks held by syz-executor972/7375: [ 344.232898][ T7375] #0: 000000000f16ca5f (sb_writers#5){.+.+}, at: vfs_write+0x429/0x580 [ 344.241224][ T7375] #1: 000000004db6d77d (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 344.251960][ T7375] [ 344.251960][ T7375] stack backtrace: [ 344.257824][ T7375] CPU: 1 PID: 7375 Comm: syz-executor972 Not tainted 5.0.0-rc4-next-20190201 #25 [ 344.266895][ T7375] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 344.276916][ T7375] Call Trace: [ 344.280177][ T7375] dump_stack+0x172/0x1f0 [ 344.284477][ T7375] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 344.290514][ T7375] __lock_acquire+0x2e7a/0x4790 [ 344.295337][ T7375] ? mark_held_locks+0xf0/0xf0 [ 344.300086][ T7375] ? __lock_is_held+0xb6/0x140 [ 344.304836][ T7375] lock_acquire+0x16f/0x3f0 [ 344.309321][ T7375] ? __do_page_fault+0x9e9/0xda0 [ 344.314239][ T7375] down_read+0x3b/0x90 [ 344.318280][ T7375] ? __do_page_fault+0x9e9/0xda0 [ 344.323190][ T7375] __do_page_fault+0x9e9/0xda0 [ 344.327928][ T7375] ? trace_hardirqs_off_caller+0x65/0x220 [ 344.333619][ T7375] do_page_fault+0x71/0x581 [ 344.338093][ T7375] page_fault+0x1e/0x30 [ 344.342223][ T7375] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 344.348691][ T7375] Code: 89 f6 41 88 57 e0 e8 18 16 45 fe 45 85 f6 74 c1 e9 70 fe ff ff e8 89 14 45 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 e5 15 45 fe 85 db [ 344.368269][ T7375] RSP: 0018:ffff8880909bf9b8 EFLAGS: 00010293 [ 344.374396][ T7375] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020f08c3f [ 344.382345][ T7375] RDX: 0000000000000000 RSI: ffffffff832ae707 RDI: 0000000000000007 [ 344.390294][ T7375] RBP: ffff8880909bfa58 R08: ffff8880977ee500 R09: fffff94000418f77 [ 344.398237][ T7375] R10: fffff94000418f76 R11: ffffea00020c7bb7 R12: 0000000000001000 [ 344.406189][ T7375] R13: 0000000000001000 R14: 0000000000000000 R15: ffff8880909bfa30 [ 344.414154][ T7375] ? iov_iter_fault_in_readable+0x367/0x450 [ 344.420025][ T7375] ? iov_iter_fault_in_readable+0x367/0x450 [ 344.425911][ T7375] ? csum_and_copy_to_iter+0x15c0/0x15c0 [ 344.431519][ T7375] generic_perform_write+0x195/0x530 [ 344.436778][ T7375] ? page_endio+0x780/0x780 [ 344.441254][ T7375] ? current_time+0x140/0x140 [ 344.445907][ T7375] ? lock_acquire+0x16f/0x3f0 [ 344.450558][ T7375] __generic_file_write_iter+0x25e/0x630 [ 344.456167][ T7375] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 344.461860][ T7375] generic_file_write_iter+0x360/0x610 [ 344.467292][ T7375] ? __generic_file_write_iter+0x630/0x630 [ 344.473073][ T7375] ? __fget+0x340/0x540 [ 344.477197][ T7375] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 344.483413][ T7375] ? iov_iter_init+0xea/0x220 [ 344.488069][ T7375] __vfs_write+0x613/0x8e0 [ 344.492457][ T7375] ? kernel_read+0x120/0x120 [ 344.497022][ T7375] ? rcu_read_lock_sched_held+0x110/0x130 [ 344.502715][ T7375] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 344.508146][ T7375] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 344.514357][ T7375] ? __sb_start_write+0x1ac/0x360 [ 344.519373][ T7375] vfs_write+0x20c/0x580 [ 344.523589][ T7375] ksys_write+0xea/0x1f0 [ 344.527924][ T7375] ? __ia32_sys_read+0xb0/0xb0 [ 344.532668][ T7375] ? do_syscall_64+0x26/0x610 [ 344.537328][ T7375] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 344.543374][ T7375] ? do_syscall_64+0x26/0x610 [ 344.548028][ T7375] __x64_sys_write+0x73/0xb0 [ 344.552597][ T7375] do_syscall_64+0x103/0x610 [ 344.557173][ T7375] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 344.563040][ T7375] RIP: 0033:0x445999 [ 344.566916][ T7375] Code: e8 5c b7 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 12 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 344.586603][ T7375] RSP: 002b:00007f837f883ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 344.594991][ T7375] RAX: ffffffffffffffda RBX: 00000000006dac28 RCX: 0000000000445999 [ 344.602950][ T7375] RDX: 00000000fffffe43 RSI: 0000000020000c40 RDI: 0000000000000004 [ 344.610895][ T7375] RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000 [ 344.618840][ T7375] R10: 0000000000000000 R11: 0000000000000246