Starting mcstransd: [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [ 37.458607] audit: type=1800 audit(1549188376.760:33): pid=7524 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 37.479493] audit: type=1800 audit(1549188376.760:34): pid=7524 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 [....] startpar: service(s) returned failure: restorecond ...[?25l[?1c7[FAIL8[?25h[?0c failed! Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 42.459661] audit: type=1400 audit(1549188381.760:35): avc: denied { map } for pid=7720 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.125' (ECDSA) to the list of known hosts. executing program [ 343.246219] audit: type=1400 audit(1549188682.550:36): avc: denied { map } for pid=7732 comm="syz-executor195" path="/root/syz-executor195933446" dev="sda1" ino=1426 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 343.274840] audit: type=1400 audit(1549188682.580:37): avc: denied { map } for pid=7732 comm="syz-executor195" path="/dev/ashmem" dev="devtmpfs" ino=16956 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 [ 343.321466] [ 343.323097] ====================================================== [ 343.329533] WARNING: possible circular locking dependency detected [ 343.335857] 5.0.0-rc4+ #58 Not tainted [ 343.339714] ------------------------------------------------------ [ 343.346000] syz-executor195/7733 is trying to acquire lock: [ 343.351687] 00000000ec61b347 (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 343.359567] [ 343.359567] but task is already holding lock: [ 343.365517] 000000002e69d04c (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 343.375353] [ 343.375353] which lock already depends on the new lock. [ 343.375353] [ 343.383647] [ 343.383647] the existing dependency chain (in reverse order) is: [ 343.391244] [ 343.391244] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 343.398082] down_write+0x38/0x90 [ 343.402073] shmem_fallocate+0x15a/0xc60 [ 343.406674] ashmem_shrink_scan+0x1d7/0x4f0 [ 343.411494] ashmem_ioctl+0x2f0/0x11a0 [ 343.415897] do_vfs_ioctl+0xd6e/0x1390 [ 343.420284] ksys_ioctl+0xab/0xd0 [ 343.424237] __x64_sys_ioctl+0x73/0xb0 [ 343.428650] do_syscall_64+0x103/0x610 [ 343.433038] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 343.438723] [ 343.438723] -> #1 (ashmem_mutex){+.+.}: [ 343.444160] __mutex_lock+0xf7/0x1310 [ 343.448556] mutex_lock_nested+0x16/0x20 [ 343.453118] ashmem_mmap+0x55/0x520 [ 343.457429] mmap_region+0xc37/0x1760 [ 343.461732] do_mmap+0x8e2/0x1080 [ 343.465682] vm_mmap_pgoff+0x1c5/0x230 [ 343.470072] ksys_mmap_pgoff+0x4aa/0x630 [ 343.474661] __x64_sys_mmap+0xe9/0x1b0 [ 343.479047] do_syscall_64+0x103/0x610 [ 343.483435] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 343.489119] [ 343.489119] -> #0 (&mm->mmap_sem){++++}: [ 343.494681] lock_acquire+0x16f/0x3f0 [ 343.498983] down_read+0x3b/0x90 [ 343.502850] __do_page_fault+0x9c2/0xd60 [ 343.507412] do_page_fault+0x71/0x581 [ 343.511710] page_fault+0x1e/0x30 [ 343.515704] iov_iter_fault_in_readable+0x377/0x450 [ 343.521221] generic_perform_write+0x195/0x530 [ 343.526319] __generic_file_write_iter+0x25e/0x630 [ 343.531748] generic_file_write_iter+0x360/0x610 [ 343.537030] __vfs_write+0x613/0x8e0 [ 343.541248] vfs_write+0x20c/0x580 [ 343.545285] ksys_write+0xea/0x1f0 [ 343.549329] __x64_sys_write+0x73/0xb0 [ 343.553719] do_syscall_64+0x103/0x610 [ 343.558102] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 343.563784] [ 343.563784] other info that might help us debug this: [ 343.563784] [ 343.571896] Chain exists of: [ 343.571896] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 343.571896] [ 343.583401] Possible unsafe locking scenario: [ 343.583401] [ 343.589432] CPU0 CPU1 [ 343.594073] ---- ---- [ 343.598724] lock(&sb->s_type->i_mutex_key#12); [ 343.603464] lock(ashmem_mutex); [ 343.609407] lock(&sb->s_type->i_mutex_key#12); [ 343.616652] lock(&mm->mmap_sem); [ 343.620168] [ 343.620168] *** DEADLOCK *** [ 343.620168] [ 343.626203] 2 locks held by syz-executor195/7733: [ 343.631015] #0: 000000001d96781f (sb_writers#6){.+.+}, at: vfs_write+0x429/0x580 [ 343.638632] #1: 000000002e69d04c (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 343.648669] [ 343.648669] stack backtrace: [ 343.653199] CPU: 1 PID: 7733 Comm: syz-executor195 Not tainted 5.0.0-rc4+ #58 [ 343.660583] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 343.669991] Call Trace: [ 343.672588] dump_stack+0x172/0x1f0 [ 343.676200] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 343.681540] __lock_acquire+0x2f00/0x4700 [ 343.685669] ? mark_held_locks+0x100/0x100 [ 343.689881] ? mark_held_locks+0x100/0x100 [ 343.694092] ? __lock_is_held+0xb6/0x140 [ 343.698136] lock_acquire+0x16f/0x3f0 [ 343.701918] ? __do_page_fault+0x9c2/0xd60 [ 343.706134] down_read+0x3b/0x90 [ 343.709488] ? __do_page_fault+0x9c2/0xd60 [ 343.713715] __do_page_fault+0x9c2/0xd60 [ 343.717769] do_page_fault+0x71/0x581 [ 343.721547] page_fault+0x1e/0x30 [ 343.724982] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 343.730758] Code: 89 f6 41 88 57 e0 e8 b8 2b 47 fe 45 85 f6 74 c1 e9 70 fe ff ff e8 29 2a 47 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 85 2b 47 fe 85 db [ 343.749861] RSP: 0018:ffff88809355f9b8 EFLAGS: 00010293 [ 343.755201] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020e94c3f [ 343.762577] RDX: 0000000000000000 RSI: ffffffff8328b1e7 RDI: 0000000000000007 [ 343.769825] RBP: ffff88809355fa58 R08: ffff88809474a5c0 R09: fffff940003ede77 [ 343.777073] R10: fffff940003ede76 R11: ffffea0001f6f3b7 R12: 0000000000001000 [ 343.784319] R13: 0000000000001000 R14: 0000000000000000 R15: ffff88809355fa30 [ 343.791582] ? iov_iter_fault_in_readable+0x367/0x450 [ 343.796794] ? iov_iter_fault_in_readable+0x367/0x450 [ 343.801966] ? copy_page_from_iter+0x750/0x750 [ 343.806546] generic_perform_write+0x195/0x530 [ 343.811108] ? page_endio+0x780/0x780 [ 343.814910] ? current_time+0x140/0x140 [ 343.818951] ? lock_acquire+0x16f/0x3f0 [ 343.822905] __generic_file_write_iter+0x25e/0x630 [ 343.827861] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 343.832867] generic_file_write_iter+0x360/0x610 [ 343.837603] ? __generic_file_write_iter+0x630/0x630 [ 343.842686] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 343.848212] ? iov_iter_init+0xea/0x220 [ 343.852165] __vfs_write+0x613/0x8e0 [ 343.855858] ? kernel_read+0x120/0x120 [ 343.859763] ? rcu_read_lock_sched_held+0x110/0x130 [ 343.864756] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 343.869491] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 343.875016] ? __sb_start_write+0x1ac/0x360 [ 343.879315] vfs_write+0x20c/0x580 [ 343.882832] ksys_write+0xea/0x1f0 [ 343.886350] ? __ia32_sys_read+0xb0/0xb0 [ 343.890392] ? do_syscall_64+0x26/0x610 [ 343.894345] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 343.899715] ? do_syscall_64+0x26/0x610 [ 343.903684] __x64_sys_write+0x73/0xb0 [ 343.907558] do_syscall_64+0x103/0x610 [ 343.911426] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 343.916592] RIP: 0033:0x445a69 [ 343.919763] Code: e8 8c bc 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 cb 11 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 343.938645] RSP: 002b:00007f139fad7ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 343.946339] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 0000000000445a69 [ 343.953590] RDX: 00000000fffffe43 RSI: 0000000020000c40 RDI: 0000000000000004 [ 343.960835] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 [ 343.968078] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000