[?25l[?1c7[ ok 8[?25h[?0c. [....] 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[?25l[?1c7[ ok 8[?25h[?0c. [ 11.843233] audit: type=1400 audit(1515564382.010:6): avc: denied { map } for pid=3483 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 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.15.212' (ECDSA) to the list of known hosts. net.ipv6.conf.syz0.accept_dad = 0 net.ipv6.conf.syz0.router_solicitations = 0 syzkaller login: [ 21.648617] audit: type=1400 audit(1515564391.815:7): avc: denied { map } for pid=3498 comm="syzkaller065447" path="/root/syzkaller065447420" 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 [ 21.768591] [ 21.770246] ====================================================== [ 21.770363] audit: type=1400 audit(1515564391.934:8): avc: denied { map } for pid=3498 comm="syzkaller065447" path="/dev/ashmem" dev="devtmpfs" ino=8995 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 [ 21.801226] WARNING: possible circular locking dependency detected [ 21.807515] 4.15.0-rc6-mm1+ #52 Not tainted [ 21.811800] ------------------------------------------------------ [ 21.818083] syzkaller065447/3498 is trying to acquire lock: [ 21.823755] (&sb->s_type->i_mutex_key#11){++++}, at: [<0000000046327fc5>] shmem_file_llseek+0xef/0x240 [ 21.833270] [ 21.833270] but task is already holding lock: [ 21.839977] (ashmem_mutex){+.+.}, at: [<0000000063aad848>] ashmem_llseek+0x56/0x1f0 [ 21.847844] [ 21.847844] which lock already depends on the new lock. [ 21.847844] [ 21.856123] [ 21.856123] the existing dependency chain (in reverse order) is: [ 21.863715] [ 21.863715] -> #2 (ashmem_mutex){+.+.}: [ 21.869151] __mutex_lock+0x16f/0x1a80 [ 21.873528] mutex_lock_nested+0x16/0x20 [ 21.878077] ashmem_mmap+0x53/0x410 [ 21.882202] mmap_region+0xa99/0x15a0 [ 21.886496] do_mmap+0x73c/0xf70 [ 21.890358] vm_mmap_pgoff+0x1de/0x280 [ 21.894733] SyS_mmap_pgoff+0x462/0x5f0 [ 21.899199] SyS_mmap+0x16/0x20 [ 21.902967] entry_SYSCALL_64_fastpath+0x23/0x9a [ 21.908214] [ 21.908214] -> #1 (&mm->mmap_sem){++++}: [ 21.913731] __might_fault+0x13a/0x1d0 [ 21.918110] _copy_to_user+0x2c/0xc0 [ 21.922312] filldir+0x1a7/0x320 [ 21.926173] dcache_readdir+0x12d/0x5e0 [ 21.930634] iterate_dir+0x1ca/0x530 [ 21.934839] SyS_getdents+0x225/0x450 [ 21.939128] entry_SYSCALL_64_fastpath+0x23/0x9a [ 21.944367] [ 21.944367] -> #0 (&sb->s_type->i_mutex_key#11){++++}: [ 21.951099] lock_acquire+0x1d5/0x580 [ 21.955386] down_write+0x87/0x120 [ 21.959431] shmem_file_llseek+0xef/0x240 [ 21.964067] vfs_llseek+0xa2/0xd0 [ 21.968013] ashmem_llseek+0xe7/0x1f0 [ 21.972305] SyS_lseek+0xeb/0x170 [ 21.976249] entry_SYSCALL_64_fastpath+0x23/0x9a [ 21.981489] [ 21.981489] other info that might help us debug this: [ 21.981489] [ 21.989604] Chain exists of: [ 21.989604] &sb->s_type->i_mutex_key#11 --> &mm->mmap_sem --> ashmem_mutex [ 21.989604] [ 22.001114] Possible unsafe locking scenario: [ 22.001114] [ 22.007153] CPU0 CPU1 [ 22.011795] ---- ---- [ 22.016427] lock(ashmem_mutex); [ 22.019853] lock(&mm->mmap_sem); [ 22.025876] lock(ashmem_mutex); [ 22.031817] lock(&sb->s_type->i_mutex_key#11); [ 22.036544] [ 22.036544] *** DEADLOCK *** [ 22.036544] [ 22.042569] 1 lock held by syzkaller065447/3498: [ 22.047289] #0: (ashmem_mutex){+.+.}, at: [<0000000063aad848>] ashmem_llseek+0x56/0x1f0 [ 22.055583] [ 22.055583] stack backtrace: [ 22.060060] CPU: 0 PID: 3498 Comm: syzkaller065447 Not tainted 4.15.0-rc6-mm1+ #52 [ 22.067731] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.077056] Call Trace: [ 22.079614] dump_stack+0x194/0x257 [ 22.083216] ? arch_local_irq_restore+0x53/0x53 [ 22.087855] print_circular_bug.isra.37+0x2cd/0x2dc [ 22.092839] ? save_trace+0xe0/0x2b0 [ 22.096522] __lock_acquire+0x30a8/0x3e00 [ 22.100641] ? lock_downgrade+0x980/0x980 [ 22.104763] ? __mutex_unlock_slowpath+0xe9/0xac0 [ 22.109592] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.114748] ? ashmem_llseek+0x56/0x1f0 [ 22.118693] ? lock_release+0xa40/0xa40 [ 22.122636] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.128502] ? vma_set_page_prot+0x16b/0x230 [ 22.132879] ? rcu_note_context_switch+0x710/0x710 [ 22.137788] ? vma_wants_writenotify+0x3b0/0x3b0 [ 22.142526] ? __might_sleep+0x95/0x190 [ 22.146466] ? ashmem_llseek+0x56/0x1f0 [ 22.150409] ? __mutex_lock+0x16f/0x1a80 [ 22.154441] ? ashmem_llseek+0x56/0x1f0 [ 22.158380] ? ashmem_llseek+0x56/0x1f0 [ 22.162328] ? mutex_lock_io_nested+0x1900/0x1900 [ 22.167137] ? vm_mmap_pgoff+0x1ed/0x280 [ 22.171164] ? selinux_mmap_addr+0x1f/0xf0 [ 22.175365] ? userfaultfd_unmap_complete+0x327/0x510 [ 22.180532] ? get_unmapped_area+0x265/0x300 [ 22.184908] lock_acquire+0x1d5/0x580 [ 22.188676] ? lock_acquire+0x1d5/0x580 [ 22.192623] ? shmem_file_llseek+0xef/0x240 [ 22.196917] ? lock_release+0xa40/0xa40 [ 22.200857] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.206710] ? rcu_note_context_switch+0x710/0x710 [ 22.211611] ? __fget_light+0x297/0x380 [ 22.215550] ? __might_sleep+0x95/0x190 [ 22.219493] down_write+0x87/0x120 [ 22.222999] ? shmem_file_llseek+0xef/0x240 [ 22.227295] ? down_read+0x150/0x150 [ 22.230977] ? selinux_capable+0x40/0x40 [ 22.235011] shmem_file_llseek+0xef/0x240 [ 22.239137] ? shmem_free_swap+0x80/0x80 [ 22.243165] vfs_llseek+0xa2/0xd0 [ 22.246585] ashmem_llseek+0xe7/0x1f0 [ 22.250354] ? ashmem_read_iter+0x230/0x230 [ 22.254649] SyS_lseek+0xeb/0x170 [ 22.258072] entry_SYSCALL_64_fastpath+0x23/0x9a [ 22.262796] RIP: 0033:0x444ac9 [ 22.265959] RSP: 002b:00007ffe6feacd18 EFLAGS: 0000021