[....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 11.321647] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 20.628884] random: sshd: uninitialized urandom read (32 bytes read) [ 20.871139] audit: type=1400 audit(1538373532.298:6): avc: denied { map } for pid=1756 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 [ 20.915916] random: sshd: uninitialized urandom read (32 bytes read) [ 21.404126] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.21' (ECDSA) to the list of known hosts. [ 27.213997] urandom_read: 1 callbacks suppressed [ 27.214001] random: sshd: uninitialized urandom read (32 bytes read) executing program executing program executing program executing program executing program executing program [ 27.328892] audit: type=1400 audit(1538373538.748:7): avc: denied { map } for pid=1774 comm="syz-executor279" path="/root/syz-executor279299123" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 27.404454] audit: type=1400 audit(1538373538.828:8): avc: denied { map } for pid=1781 comm="syz-executor279" path="/dev/ashmem" dev="devtmpfs" ino=1083 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 executing program executing program executing program executing program executing program executing program [ 27.542083] [ 27.543773] ====================================================== [ 27.550095] WARNING: possible circular locking dependency detected [ 27.556420] 4.14.73+ #12 Not tainted [ 27.560247] ------------------------------------------------------ [ 27.566569] syz-executor279/1804 is trying to acquire lock: [ 27.572295] (&mm->mmap_sem){++++}, at: [] __do_page_fault+0x868/0xb60 [ 27.580551] [ 27.580551] but task is already holding lock: executing program executing program [ 27.586525] (&sb->s_type->i_mutex_key#10){+.+.}, at: [] generic_file_write_iter+0x99/0x650 [ 27.596602] [ 27.596602] which lock already depends on the new lock. [ 27.596602] [ 27.604923] [ 27.604923] the existing dependency chain (in reverse order) is: [ 27.612544] [ 27.612544] -> #2 (&sb->s_type->i_mutex_key#10){+.+.}: [ 27.619860] down_write+0x34/0x90 [ 27.623850] shmem_fallocate+0x149/0xb20 [ 27.628441] ashmem_shrink_scan+0x1b6/0x4e0 [ 27.633292] ashmem_ioctl+0x2cc/0xe20 [ 27.637627] do_vfs_ioctl+0x1a0/0x1030 [ 27.642042] SyS_ioctl+0x7e/0xb0 [ 27.645937] do_syscall_64+0x19b/0x4b0 [ 27.650353] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 27.656070] [ 27.656070] -> #1 (ashmem_mutex){+.+.}: [ 27.661553] __mutex_lock+0xf5/0x1480 [ 27.665879] ashmem_mmap+0x4c/0x3b0 [ 27.670040] mmap_region+0x836/0xfb0 [ 27.675157] do_mmap+0x551/0xb80 [ 27.679210] vm_mmap_pgoff+0x180/0x1d0 [ 27.683729] SyS_mmap_pgoff+0xf8/0x1a0 [ 27.688142] do_syscall_64+0x19b/0x4b0 executing program executing program [ 27.692555] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 27.698281] [ 27.698281] -> #0 (&mm->mmap_sem){++++}: [ 27.703852] lock_acquire+0x10f/0x380 [ 27.708174] down_read+0x37/0xa0 [ 27.712098] __do_page_fault+0x868/0xb60 [ 27.717119] page_fault+0x22/0x50 [ 27.722745] iov_iter_fault_in_readable+0x2b9/0x370 [ 27.728443] generic_perform_write+0x166/0x430 [ 27.733539] __generic_file_write_iter+0x345/0x540 executing program [ 27.739156] generic_file_write_iter+0x36f/0x650 [ 27.744776] __vfs_write+0x417/0x5c0 [ 27.749133] vfs_write+0x17f/0x4d0 [ 27.753351] SyS_write+0xc2/0x1a0 [ 27.757653] do_syscall_64+0x19b/0x4b0 [ 27.762053] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 27.767907] [ 27.767907] other info that might help us debug this: [ 27.767907] [ 27.776920] Chain exists of: [ 27.776920] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#10 [ 27.776920] executing program [ 27.789427] Possible unsafe locking scenario: [ 27.789427] [ 27.795764] CPU0 CPU1 [ 27.800609] ---- ---- [ 27.805401] lock(&sb->s_type->i_mutex_key#10); [ 27.810283] lock(ashmem_mutex); [ 27.816555] lock(&sb->s_type->i_mutex_key#10); [ 27.824260] lock(&mm->mmap_sem); [ 27.828356] [ 27.828356] *** DEADLOCK *** [ 27.828356] [ 27.834740] 2 locks held by syz-executor279/1804: executing program executing program [ 27.839718] #0: (sb_writers#6){.+.+}, at: [] vfs_write+0x3d7/0x4d0 [ 27.847891] #1: (&sb->s_type->i_mutex_key#10){+.+.}, at: [] generic_file_write_iter+0x99/0x650 [ 27.858381] [ 27.858381] stack backtrace: [ 27.863104] CPU: 0 PID: 1804 Comm: syz-executor279 Not tainted 4.14.73+ #12 [ 27.870470] Call Trace: [ 27.873052] dump_stack+0xb9/0x11b [ 27.877898] print_circular_bug.isra.18.cold.43+0x2d3/0x40c [ 27.885246] ? save_trace+0xd6/0x250 [ 27.889261] __lock_acquire+0x2ff9/0x4320 executing program executing program [ 27.893541] ? trace_hardirqs_on+0x10/0x10 [ 27.897893] ? __lock_acquire+0x619/0x4320 [ 27.902119] ? trace_hardirqs_on_caller+0x381/0x520 [ 27.907378] ? _raw_spin_unlock_irq+0x35/0x50 [ 27.912281] ? __switch_to_asm+0x34/0x70 [ 27.916333] ? __switch_to_asm+0x40/0x70 [ 27.920525] ? trace_hardirqs_on+0x10/0x10 [ 27.926082] ? cmp_ex_search+0x6f/0x90 [ 27.930899] ? bsearch+0x83/0xa0 [ 27.934266] lock_acquire+0x10f/0x380 [ 27.938339] ? __do_page_fault+0x868/0xb60 executing program executing program [ 27.942680] down_read+0x37/0xa0 [ 27.946571] ? __do_page_fault+0x868/0xb60 [ 27.951295] __do_page_fault+0x868/0xb60 [ 27.955460] ? bad_area_access_error+0x330/0x330 [ 27.960231] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.965396] page_fault+0x22/0x50 [ 27.968844] RIP: 0010:iov_iter_fault_in_readable+0x2b9/0x370 [ 27.974736] RSP: 0018:ffff8801d1ae79f8 EFLAGS: 00010297 [ 27.980096] RAX: 0000000000000000 RBX: 000000000000007f RCX: 0000000000001000 executing program executing program [ 27.987633] RDX: 0000000000000000 RSI: 0000000000001000 RDI: ffff8801d1ae7cf8 [ 27.997286] RBP: 1ffff1003a35cf40 R08: 0000000000001000 R09: ffffea000738f5c0 [ 28.005013] R10: ffffffffa327e0d0 R11: ffff8801ce3d7fff R12: 0000000000000000 [ 28.012742] R13: 00000000204b353f R14: 0000000000001000 R15: ffff8801d1ae7cf0 [ 28.020436] ? shmem_put_link+0xd0/0xd0 [ 28.024581] ? iov_iter_fault_in_readable+0x2b3/0x370 [ 28.029871] ? flex_array_free_parts+0xd0/0xd0 [ 28.034603] ? __set_page_dirty_no_writeback+0xa7/0x100 [ 28.039976] ? iov_iter_advance+0x1cf/0xc20 executing program [ 28.044290] generic_perform_write+0x166/0x430 [ 28.049072] ? filemap_page_mkwrite+0x2d0/0x2d0 [ 28.053937] ? file_update_time+0xbc/0x390 [ 28.058162] ? current_time+0xb0/0xb0 [ 28.062986] ? lock_acquire+0x10f/0x380 [ 28.068223] __generic_file_write_iter+0x345/0x540 [ 28.074474] generic_file_write_iter+0x36f/0x650 [ 28.079235] ? iov_iter_init+0xa8/0x1c0 [ 28.084722] __vfs_write+0x417/0x5c0 [ 28.088438] ? kernel_read+0x110/0x110 executing program executing program [ 28.092778] ? rcu_read_lock_sched_held+0x102/0x120 [ 28.097972] vfs_write+0x17f/0x4d0 [ 28.101659] SyS_write+0xc2/0x1a0 [ 28.105351] ? SyS_read+0x1a0/0x1a0 [ 28.109105] ? SyS_memfd_create+0x2a8/0x310 [ 28.113420] ? kfree+0xf5/0x310 [ 28.116825] ? do_syscall_64+0x43/0x4b0 [ 28.122009] ? SyS_read+0x1a0/0x1a0 [ 28.126896] do_syscall_64+0x19b/0x4b0 [ 28.131703] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 28.137332] RIP: 0033:0x446449 executing program executing program executing program executing program executing program [ 28.140651] RSP: 002b:00007fe17400dda8 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 28.149627] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 0000000000446449 [ 28.158352] RDX: 00000000fffffda2 RSI: 0000000020000540 RDI: 0000000000000003 [ 28.165757] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 [ 28.174551] R10: 0000000000000000 R11: 0000000000000293 R12: 00000000006dbc2c [ 28.184721] R13: dfdd4f11168a8b2b R14: 6873612f7665642f R15: 0000000000000000 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 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 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