[?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. [ 12.476839] audit: type=1400 audit(1515534998.302:6): avc: denied { map } for pid=3482 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.0.38' (ECDSA) to the list of known hosts. net.ipv6.conf.syz0.accept_dad = 0 net.ipv6.conf.syz0.router_solicitations = 0 syzkaller login: [ 20.843415] audit: type=1400 audit(1515535006.669:7): avc: denied { map } for pid=3497 comm="syzkaller303685" path="/root/syzkaller303685101" 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 [ 20.956308] [ 20.957965] ====================================================== [ 20.962698] audit: type=1400 audit(1515535006.781:8): avc: denied { map } for pid=3497 comm="syzkaller303685" path="/dev/ashmem" dev="devtmpfs" ino=178 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 [ 20.988861] WARNING: possible circular locking dependency detected [ 20.995146] 4.15.0-rc7+ #255 Not tainted [ 20.999167] ------------------------------------------------------ [ 21.005446] syzkaller303685/3497 is trying to acquire lock: [ 21.011124] (&sb->s_type->i_mutex_key#11){++++}, at: [<000000006886b3fb>] shmem_file_llseek+0xef/0x240 [ 21.020631] [ 21.020631] but task is already holding lock: [ 21.026568] (ashmem_mutex){+.+.}, at: [<00000000a44304a8>] ashmem_llseek+0x56/0x1f0 [ 21.034416] [ 21.034416] which lock already depends on the new lock. [ 21.034416] [ 21.042695] [ 21.042695] the existing dependency chain (in reverse order) is: [ 21.050282] [ 21.050282] -> #2 (ashmem_mutex){+.+.}: [ 21.055705] __mutex_lock+0x16f/0x1a80 [ 21.060076] mutex_lock_nested+0x16/0x20 [ 21.064620] ashmem_mmap+0x53/0x410 [ 21.068734] mmap_region+0xa99/0x15a0 [ 21.073028] do_mmap+0x6c0/0xe00 [ 21.076880] vm_mmap_pgoff+0x1de/0x280 [ 21.081253] SyS_mmap_pgoff+0x462/0x5f0 [ 21.085715] SyS_mmap+0x16/0x20 [ 21.089483] entry_SYSCALL_64_fastpath+0x23/0x9a [ 21.094729] [ 21.094729] -> #1 (&mm->mmap_sem){++++}: [ 21.100241] __might_fault+0x13a/0x1d0 [ 21.104623] _copy_to_user+0x2c/0xc0 [ 21.108820] filldir+0x1a7/0x320 [ 21.112671] dcache_readdir+0x12d/0x5e0 [ 21.117131] iterate_dir+0x1ca/0x530 [ 21.121328] SyS_getdents+0x225/0x450 [ 21.125613] entry_SYSCALL_64_fastpath+0x23/0x9a [ 21.130851] [ 21.130851] -> #0 (&sb->s_type->i_mutex_key#11){++++}: [ 21.137576] lock_acquire+0x1d5/0x580 [ 21.141868] down_write+0x87/0x120 [ 21.145892] shmem_file_llseek+0xef/0x240 [ 21.150524] vfs_llseek+0xa2/0xd0 [ 21.154468] ashmem_llseek+0xe7/0x1f0 [ 21.158756] SyS_lseek+0xeb/0x170 [ 21.162694] entry_SYSCALL_64_fastpath+0x23/0x9a [ 21.167934] [ 21.167934] other info that might help us debug this: [ 21.167934] [ 21.176037] Chain exists of: [ 21.176037] &sb->s_type->i_mutex_key#11 --> &mm->mmap_sem --> ashmem_mutex [ 21.176037] [ 21.187540] Possible unsafe locking scenario: [ 21.187540] [ 21.193563] CPU0 CPU1 [ 21.198191] ---- ---- [ 21.202821] lock(ashmem_mutex); [ 21.206236] lock(&mm->mmap_sem); [ 21.212253] lock(ashmem_mutex); [ 21.218184] lock(&sb->s_type->i_mutex_key#11); [ 21.222903] [ 21.222903] *** DEADLOCK *** [ 21.222903] [ 21.228927] 1 lock held by syzkaller303685/3497: [ 21.233648] #0: (ashmem_mutex){+.+.}, at: [<00000000a44304a8>] ashmem_llseek+0x56/0x1f0 [ 21.241936] [ 21.241936] stack backtrace: [ 21.246398] CPU: 0 PID: 3497 Comm: syzkaller303685 Not tainted 4.15.0-rc7+ #255 [ 21.253805] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.263122] Call Trace: [ 21.265685] dump_stack+0x194/0x257 [ 21.269278] ? arch_local_irq_restore+0x53/0x53 [ 21.273913] print_circular_bug.isra.37+0x2cd/0x2dc [ 21.278898] ? save_trace+0xe0/0x2b0 [ 21.282577] __lock_acquire+0x30a8/0x3e00 [ 21.286690] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 21.291848] ? ashmem_llseek+0x56/0x1f0 [ 21.295791] ? lock_release+0xa40/0xa40 [ 21.299735] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 21.305584] ? rcu_note_context_switch+0x710/0x710 [ 21.310566] ? vma_wants_writenotify+0x3b0/0x3b0 [ 21.315286] ? __might_sleep+0x95/0x190 [ 21.319223] ? ashmem_llseek+0x56/0x1f0 [ 21.323163] ? __mutex_lock+0x16f/0x1a80 [ 21.327189] ? ashmem_llseek+0x56/0x1f0 [ 21.331126] ? mmap_region+0x52e/0x15a0 [ 21.335064] ? ashmem_llseek+0x56/0x1f0 [ 21.339004] ? mutex_lock_io_nested+0x1900/0x1900 [ 21.343817] ? vm_mmap_pgoff+0x1ed/0x280 [ 21.347842] ? userfaultfd_unmap_complete+0x327/0x510 [ 21.353003] lock_acquire+0x1d5/0x580 [ 21.356772] ? lock_acquire+0x1d5/0x580 [ 21.360710] ? shmem_file_llseek+0xef/0x240 [ 21.364998] ? lock_release+0xa40/0xa40 [ 21.368941] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 21.374788] ? rcu_note_context_switch+0x710/0x710 [ 21.379681] ? __fget_light+0x297/0x380 [ 21.383625] ? __might_sleep+0x95/0x190 [ 21.387566] down_write+0x87/0x120 [ 21.391069] ? shmem_file_llseek+0xef/0x240 [ 21.395354] ? down_read+0x150/0x150 [ 21.399033] ? selinux_capable+0x40/0x40 [ 21.403059] shmem_file_llseek+0xef/0x240 [ 21.407172] ? shmem_free_swap+0x80/0x80 [ 21.411200] vfs_llseek+0xa2/0xd0 [ 21.414618] ashmem_llseek+0xe7/0x1f0 [ 21.418381] ? ashmem_read_iter+0x230/0x230 [ 21.422668] SyS_lseek+0xeb/0x170 [ 21.426088] entry_SYSCALL_64_fastpath+0x23/0x9a [ 21.430807] RIP: 0033:0x444aa9 [ 21.433962] RSP: 002b:00007ffd2bec96f8 EFLAGS: 00000217 ORIG_RAX: 0000000000000008 [ 21.441633] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000444aa9 [ 21.448866] RDX: 0000000000000003 RSI: fffffffffffffffc RDI: 0000000000000004 [ 21.456100] RBP: 00000000