[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 10.359552] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. [ 11.465679] random: crng init done Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.79' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program syzkaller login: [ 39.085074] [ 39.085489] ====================================================== [ 39.087263] [ INFO: possible circular locking dependency detected ] [ 39.088886] 4.9.194+ #0 Not tainted [ 39.089764] ------------------------------------------------------- [ 39.091120] syz-executor488/2080 is trying to acquire lock: [ 39.092864] (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [<0000000039d4492a>] shmem_fallocate+0x143/0xab0 [ 39.095736] but task is already holding lock: [ 39.097279] (ashmem_mutex){+.+.+.}, at: [<00000000f5700507>] ashmem_shrink_scan+0x56/0x4c0 [ 39.099623] which lock already depends on the new lock. [ 39.099623] [ 39.101714] [ 39.101714] the existing dependency chain (in reverse order) is: [ 39.103889] -> #2 (ashmem_mutex){+.+.+.}: [ 39.105669] lock_acquire+0x133/0x3d0 [ 39.109984] mutex_lock_nested+0xc7/0x920 [ 39.114651] ashmem_mmap+0x53/0x470 [ 39.118799] mmap_region+0x7e7/0xfa0 [ 39.123027] do_mmap+0x539/0xbc0 [ 39.126905] vm_mmap_pgoff+0x179/0x1c0 [ 39.131310] SyS_mmap_pgoff+0xfa/0x1b0 [ 39.135711] SyS_mmap+0x16/0x20 [ 39.139502] do_syscall_64+0x1ad/0x5c0 [ 39.143904] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 39.149510] -> #1 (&mm->mmap_sem){++++++}: [ 39.154444] lock_acquire+0x133/0x3d0 [ 39.158761] down_read+0x44/0xb0 [ 39.162638] __do_page_fault+0x7bd/0xa60 [ 39.167212] do_page_fault+0x28/0x30 [ 39.171424] page_fault+0x25/0x30 [ 39.175373] generic_perform_write+0x1b6/0x500 [ 39.180451] __generic_file_write_iter+0x340/0x530 [ 39.185875] generic_file_write_iter+0x38a/0x630 [ 39.191127] __vfs_write+0x3c1/0x560 [ 39.195339] vfs_write+0x185/0x520 [ 39.199377] SyS_pwrite64+0x13f/0x170 [ 39.203675] do_syscall_64+0x1ad/0x5c0 [ 39.208060] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 39.213656] -> #0 (&sb->s_type->i_mutex_key#10){+.+.+.}: [ 39.219960] __lock_acquire+0x2d22/0x4390 [ 39.224604] lock_acquire+0x133/0x3d0 [ 39.228900] down_write+0x41/0xa0 [ 39.232850] shmem_fallocate+0x143/0xab0 [ 39.237410] ashmem_shrink_scan+0x1c3/0x4c0 [ 39.242230] ashmem_ioctl+0x29b/0xdd0 [ 39.246528] do_vfs_ioctl+0xb87/0x11d0 [ 39.250909] SyS_ioctl+0x8f/0xc0 [ 39.254774] do_syscall_64+0x1ad/0x5c0 [ 39.259157] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 39.264752] [ 39.264752] other info that might help us debug this: [ 39.264752] [ 39.272881] Chain exists of: &sb->s_type->i_mutex_key#10 --> &mm->mmap_sem --> ashmem_mutex [ 39.282642] Possible unsafe locking scenario: [ 39.282642] [ 39.288679] CPU0 CPU1 [ 39.293320] ---- ---- [ 39.298047] lock(ashmem_mutex); [ 39.301721] lock(&mm->mmap_sem); [ 39.307996] lock(ashmem_mutex); [ 39.314191] lock(&sb->s_type->i_mutex_key#10); [ 39.319293] [ 39.319293] *** DEADLOCK *** [ 39.319293] [ 39.325329] 1 lock held by syz-executor488/2080: [ 39.330055] #0: (ashmem_mutex){+.+.+.}, at: [<00000000f5700507>] ashmem_shrink_scan+0x56/0x4c0 [ 39.339447] [ 39.339447] stack backtrace: [ 39.343919] CPU: 1 PID: 2080 Comm: syz-executor488 Not tainted 4.9.194+ #0 [ 39.350908] ffff8801c561f6b8 ffffffff81b67001 ffffffff83cba170 ffffffff83cce210 [ 39.358909] ffffffff83cb0990 ffffffff84252000 ffff8801d1ca0000 ffff8801c561f710 [ 39.366906] ffffffff81406d83 0000000000000000 ffffffff8402b000 ffff8801d1ca08d8 [ 39.374904] Call Trace: [ 39.377470] [<0000000098d3fab7>] dump_stack+0xc1/0x120 [ 39.382809] [<0000000011d79d4d>] print_circular_bug.cold+0x2f6/0x454 [ 39.389375] [<0000000092edc2e5>] __lock_acquire+0x2d22/0x4390 [ 39.395320] [<000000006c6d5b8d>] ? __lock_acquire+0x5e0/0x4390 [ 39.401356] [<00000000daf4db0d>] ? trace_hardirqs_on+0x10/0x10 [ 39.407390] [<00000000daf4db0d>] ? trace_hardirqs_on+0x10/0x10 [ 39.413426] [<000000006fa6a457>] ? _raw_spin_unlock_irq+0x39/0x60 [ 39.419807] [<0000000041cf82ef>] lock_acquire+0x133/0x3d0 [ 39.425406] [<0000000039d4492a>] ? shmem_fallocate+0x143/0xab0 [ 39.431441] [<0000000018b1a8aa>] down_write+0x41/0xa0 [ 39.436702] [<0000000039d4492a>] ? shmem_fallocate+0x143/0xab0 [ 39.442743] [<0000000039d4492a>] shmem_fallocate+0x143/0xab0 [ 39.448603] [<000000004ab96061>] ? avc_has_extended_perms+0xd30/0xd30 [ 39.455245] [<0000000009cfd72f>] ? shmem_setattr+0x7a0/0x7a0 [ 39.461111] [<00000000daf4db0d>] ? trace_hardirqs_on+0x10/0x10 [ 39.467154] [<00000000f5d8cd36>] ? debug_lockdep_rcu_enabled+0x71/0xa0 [ 39.473892] [<00000000515dc810>] ? cred_has_capability+0x149/0x2a0 [ 39.480273] [<0000000070c5bccd>] ? check_preemption_disabled+0x3c/0x200 [ 39.487088] [<00000000d93c4aa8>] ? selinux_file_open+0x590/0x590 [ 39.493295] [<00000000b36f77d0>] ? mark_held_locks+0xb1/0x100 [ 39.499242] [<0000000092eddcb8>] ? mutex_trylock+0x258/0x3f0 [ 39.505104] [<000000008bdb147c>] ? trace_hardirqs_on_caller+0x385/0x5a0 [ 39.511919] [<00000000455e2e7f>] ? trace_hardirqs_on+0xd/0x10 [ 39.517869] [<00000000f5700507>] ? ashmem_shrink_scan+0x56/0x4c0 [ 39.524076] [<00000000d4ef63f7>] ashmem_shrink_scan+0x1c3/0x4c0 [ 39.530198] [<00000000b49c0f42>] ashmem_ioctl+0x29b/0xdd0 [ 39.535797] [<00000000d8d19ee2>] ? ashmem_shrink_scan+0x4c0/0x4c0 [ 39.542092] [<0000000033ad325b>] ? __might_sleep+0x95/0x1a0 [ 39.547874] [<00000000d8d19ee2>] ? ashmem_shrink_scan+0x4c0/0x4c0 [ 39.554171] [<00000000f7c6a53b>] do_vfs_ioctl+0xb87/0x11d0 [ 39.559864] [<0000000093c4a257>] ? selinux_file_ioctl+0x103/0x550 [ 39.566169] [<000000005c02cc21>] ? ioctl_preallocate+0x210/0x210 [ 39.572376] [<000000002f676b42>] ? selinux_parse_skb.constprop.0+0x16b0/0x16b0 [ 39.579800] [<000000008f5cef2a>] ? __fget+0x208/0x370 [ 39.585066] [<00000000bd9214e0>] ? __fget+0x22f/0x370 [ 39.590328] [<00000000f7bd8d92>] ? __fget+0x47/0x370 [ 39.595498] [<00000000fc735352>] ? security_file_ioctl+0x8f/0xc0 [ 39.601813] [<000000009b17ebe3>] SyS_ioctl+0x8f/0xc0 [ 39.606983] [<00000000393584e2>] ? do_vfs_ioctl+0x11d0/0x11d0 [ 39.613038] [<00000000d1c7aa44>] do_syscall_64+0x1ad/0x5c0 [ 39.623848] [<00000000577c685c>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program