[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 16.729982] audit: type=1400 audit(1515561519.752:6): avc: denied { map } for pid=3480 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 [ 16.761356] sshd (3478) used greatest stack depth: 17040 bytes left Warning: Permanently added '10.128.0.57' (ECDSA) to the list of known hosts. net.ipv6.conf.syz0.accept_dad = 0 net.ipv6.conf.syz0.router_solicitations = 0 [ 22.952763] audit: type=1400 audit(1515561525.975:7): avc: denied { map } for pid=3495 comm="syzkaller172727" path="/root/syzkaller172727062" 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 executing program [ 23.043460] [ 23.043673] audit: type=1400 audit(1515561526.065:8): avc: denied { map } for pid=3495 comm="syzkaller172727" path="/dev/ashmem" dev="devtmpfs" ino=137 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 [ 23.069732] ====================================================== [ 23.076019] WARNING: possible circular locking dependency detected [ 23.082310] 4.15.0-rc6-mm1+ #52 Not tainted [ 23.086595] ------------------------------------------------------ [ 23.092886] syzkaller172727/3495 is trying to acquire lock: [ 23.098562] (&sb->s_type->i_mutex_key#11){++++}, at: [<000000009617663c>] shmem_file_llseek+0xef/0x240 [ 23.108087] [ 23.108087] but task is already holding lock: [ 23.114026] (ashmem_mutex){+.+.}, at: [<0000000020d8fe69>] ashmem_llseek+0x56/0x1f0 [ 23.121892] [ 23.121892] which lock already depends on the new lock. [ 23.121892] [ 23.130181] [ 23.130181] the existing dependency chain (in reverse order) is: [ 23.137773] [ 23.137773] -> #2 (ashmem_mutex){+.+.}: [ 23.143203] __mutex_lock+0x16f/0x1a80 [ 23.147581] mutex_lock_nested+0x16/0x20 [ 23.152138] ashmem_mmap+0x53/0x410 [ 23.156252] mmap_region+0xa99/0x15a0 [ 23.160539] do_mmap+0x73c/0xf70 [ 23.164400] vm_mmap_pgoff+0x1de/0x280 [ 23.168772] SyS_mmap_pgoff+0x462/0x5f0 [ 23.173239] SyS_mmap+0x16/0x20 [ 23.177009] entry_SYSCALL_64_fastpath+0x23/0x9a [ 23.182247] [ 23.182247] -> #1 (&mm->mmap_sem){++++}: [ 23.187768] __might_fault+0x13a/0x1d0 [ 23.192142] _copy_to_user+0x2c/0xc0 [ 23.196343] filldir+0x1a7/0x320 [ 23.200202] dcache_readdir+0x12d/0x5e0 [ 23.204665] iterate_dir+0x1ca/0x530 [ 23.208869] SyS_getdents+0x225/0x450 [ 23.213155] entry_SYSCALL_64_fastpath+0x23/0x9a [ 23.218395] [ 23.218395] -> #0 (&sb->s_type->i_mutex_key#11){++++}: [ 23.225132] lock_acquire+0x1d5/0x580 [ 23.229420] down_write+0x87/0x120 [ 23.233447] shmem_file_llseek+0xef/0x240 [ 23.238095] vfs_llseek+0xa2/0xd0 [ 23.242035] ashmem_llseek+0xe7/0x1f0 [ 23.246322] SyS_lseek+0xeb/0x170 [ 23.250262] entry_SYSCALL_64_fastpath+0x23/0x9a [ 23.255508] [ 23.255508] other info that might help us debug this: [ 23.255508] [ 23.263613] Chain exists of: [ 23.263613] &sb->s_type->i_mutex_key#11 --> &mm->mmap_sem --> ashmem_mutex [ 23.263613] [ 23.275143] Possible unsafe locking scenario: [ 23.275143] [ 23.281167] CPU0 CPU1 [ 23.285805] ---- ---- [ 23.290438] lock(ashmem_mutex); [ 23.293858] lock(&mm->mmap_sem); [ 23.299887] lock(ashmem_mutex); [ 23.305825] lock(&sb->s_type->i_mutex_key#11); [ 23.310562] [ 23.310562] *** DEADLOCK *** [ 23.310562] [ 23.316594] 1 lock held by syzkaller172727/3495: [ 23.321317] #0: (ashmem_mutex){+.+.}, at: [<0000000020d8fe69>] ashmem_llseek+0x56/0x1f0 [ 23.329621] [ 23.329621] stack backtrace: [ 23.334085] CPU: 1 PID: 3495 Comm: syzkaller172727 Not tainted 4.15.0-rc6-mm1+ #52 [ 23.341757] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.351090] Call Trace: [ 23.353652] dump_stack+0x194/0x257 [ 23.357253] ? arch_local_irq_restore+0x53/0x53 [ 23.361895] print_circular_bug.isra.37+0x2cd/0x2dc [ 23.366888] ? save_trace+0xe0/0x2b0 [ 23.370570] __lock_acquire+0x30a8/0x3e00 [ 23.374695] ? lock_downgrade+0x980/0x980 [ 23.378812] ? __mutex_unlock_slowpath+0xe9/0xac0 [ 23.383624] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 23.388795] ? ashmem_llseek+0x56/0x1f0 [ 23.392749] ? lock_release+0xa40/0xa40 [ 23.396698] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.402551] ? vma_set_page_prot+0x16b/0x230 [ 23.406931] ? rcu_note_context_switch+0x710/0x710 [ 23.411824] ? vma_wants_writenotify+0x3b0/0x3b0 [ 23.416552] ? __might_sleep+0x95/0x190 [ 23.420499] ? ashmem_llseek+0x56/0x1f0 [ 23.424455] ? __mutex_lock+0x16f/0x1a80 [ 23.428482] ? ashmem_llseek+0x56/0x1f0 [ 23.432425] ? ashmem_llseek+0x56/0x1f0 [ 23.436369] ? mutex_lock_io_nested+0x1900/0x1900 [ 23.441179] ? vm_mmap_pgoff+0x1ed/0x280 [ 23.445212] ? selinux_mmap_addr+0x1f/0xf0 [ 23.449424] ? userfaultfd_unmap_complete+0x327/0x510 [ 23.454581] ? get_unmapped_area+0x265/0x300 [ 23.458974] lock_acquire+0x1d5/0x580 [ 23.462740] ? lock_acquire+0x1d5/0x580 [ 23.466681] ? shmem_file_llseek+0xef/0x240 [ 23.470973] ? lock_release+0xa40/0xa40 [ 23.474926] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.480781] ? rcu_note_context_switch+0x710/0x710 [ 23.485678] ? __fget_light+0x297/0x380 [ 23.489618] ? __might_sleep+0x95/0x190 [ 23.493564] down_write+0x87/0x120 [ 23.497070] ? shmem_file_llseek+0xef/0x240 [ 23.501357] ? down_read+0x150/0x150 [ 23.505038] ? selinux_capable+0x40/0x40 [ 23.509072] shmem_file_llseek+0xef/0x240 [ 23.513187] ? shmem_free_swap+0x80/0x80 [ 23.517215] vfs_llseek+0xa2/0xd0 [ 23.520642] ashmem_llseek+0xe7/0x1f0 [ 23.524419] ? ashmem_read_iter+0x230/0x230 [ 23.528709] SyS_lseek+0xeb/0x170 [ 23.532134] entry_SYSCALL_64_fastpath+0x23/0x9a [ 23.536854] RIP: 0033:0x444ac9 [ 23.540012] RSP: 002b:00007ffcd5abd4c8 EFLAGS: 00000217 ORIG_RA