[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [ 17.335188] audit: type=1400 audit(1519640293.546:6): avc: denied { map } for pid=4073 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.48' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 23.671366] audit: type=1400 audit(1519640299.881:7): avc: denied { map } for pid=4087 comm="syzkaller062914" path="/root/syzkaller062914412" 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 [ 23.674781] [ 23.697292] audit: type=1400 audit(1519640299.882:8): avc: denied { map } for pid=4087 comm="syzkaller062914" path="/dev/ashmem" dev="devtmpfs" ino=9571 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.698870] ====================================================== [ 23.698873] WARNING: possible circular locking dependency detected [ 23.698877] 4.16.0-rc2+ #239 Not tainted [ 23.698879] ------------------------------------------------------ [ 23.698882] syzkaller062914/4087 is trying to acquire lock: [ 23.698884] (&mm->mmap_sem){++++}, at: [<000000002d452f80>] __might_fault+0xe0/0x1d0 [ 23.760075] [ 23.760075] but task is already holding lock: [ 23.766012] (ashmem_mutex){+.+.}, at: [<00000000f926b8af>] ashmem_ioctl+0x3db/0x11b0 [ 23.773955] [ 23.773955] which lock already depends on the new lock. [ 23.773955] [ 23.782237] [ 23.782237] the existing dependency chain (in reverse order) is: [ 23.789828] [ 23.789828] -> #1 (ashmem_mutex){+.+.}: [ 23.795258] __mutex_lock+0x16f/0x1a80 [ 23.799635] mutex_lock_nested+0x16/0x20 [ 23.804184] ashmem_mmap+0x53/0x410 [ 23.808301] mmap_region+0xa99/0x15a0 [ 23.812588] do_mmap+0x6c0/0xe00 [ 23.816444] vm_mmap_pgoff+0x1de/0x280 [ 23.820820] SyS_mmap_pgoff+0x462/0x5f0 [ 23.825285] do_fast_syscall_32+0x3ec/0xf9f [ 23.830097] entry_SYSENTER_compat+0x70/0x7f [ 23.834992] [ 23.834992] -> #0 (&mm->mmap_sem){++++}: [ 23.840511] lock_acquire+0x1d5/0x580 [ 23.844802] __might_fault+0x13a/0x1d0 [ 23.849180] _copy_from_user+0x2c/0x110 [ 23.853644] ashmem_ioctl+0x438/0x11b0 [ 23.858021] compat_ashmem_ioctl+0x3e/0x50 [ 23.862749] compat_SyS_ioctl+0x151/0x2a30 [ 23.867836] do_fast_syscall_32+0x3ec/0xf9f [ 23.872646] entry_SYSENTER_compat+0x70/0x7f [ 23.877541] [ 23.877541] other info that might help us debug this: [ 23.877541] [ 23.885650] Possible unsafe locking scenario: [ 23.885650] [ 23.891674] CPU0 CPU1 [ 23.896309] ---- ---- [ 23.900941] lock(ashmem_mutex); [ 23.904362] lock(&mm->mmap_sem); [ 23.910390] lock(ashmem_mutex); [ 23.916330] lock(&mm->mmap_sem); [ 23.919837] [ 23.919837] *** DEADLOCK *** [ 23.919837] [ 23.925865] 1 lock held by syzkaller062914/4087: [ 23.930588] #0: (ashmem_mutex){+.+.}, at: [<00000000f926b8af>] ashmem_ioctl+0x3db/0x11b0 [ 23.938966] [ 23.938966] stack backtrace: [ 23.943432] CPU: 0 PID: 4087 Comm: syzkaller062914 Not tainted 4.16.0-rc2+ #239 [ 23.950846] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.960168] Call Trace: [ 23.962731] dump_stack+0x194/0x24d [ 23.966327] ? arch_local_irq_restore+0x53/0x53 [ 23.970970] print_circular_bug.isra.38+0x2cd/0x2dc [ 23.975955] ? save_trace+0xe0/0x2b0 [ 23.979640] __lock_acquire+0x30a8/0x3e00 [ 23.983759] ? ashmem_ioctl+0x3db/0x11b0 [ 23.987791] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 23.992950] ? __might_sleep+0x95/0x190 [ 23.996893] ? ashmem_ioctl+0x3db/0x11b0 [ 24.000925] ? __mutex_lock+0x16f/0x1a80 [ 24.004955] ? ashmem_ioctl+0x3db/0x11b0 [ 24.008985] ? ashmem_ioctl+0x3db/0x11b0 [ 24.013019] ? mutex_lock_io_nested+0x1900/0x1900 [ 24.017833] ? lock_release+0xa40/0xa40 [ 24.021780] ? vma_wants_writenotify+0x51/0x3b0 [ 24.026419] ? vma_set_page_prot+0x16b/0x230 [ 24.030803] ? avc_ss_reset+0x110/0x110 [ 24.034752] lock_acquire+0x1d5/0x580 [ 24.038522] ? lock_acquire+0x1d5/0x580 [ 24.042467] ? __might_fault+0xe0/0x1d0 [ 24.046416] ? userfaultfd_unmap_complete+0x327/0x510 [ 24.051575] ? lock_release+0xa40/0xa40 [ 24.055521] ? trace_event_raw_event_sched_switch+0x810/0x810 [ 24.061378] ? __might_sleep+0x95/0x190 [ 24.065326] __might_fault+0x13a/0x1d0 [ 24.069182] ? __might_fault+0xe0/0x1d0 [ 24.073129] _copy_from_user+0x2c/0x110 [ 24.077074] ashmem_ioctl+0x438/0x11b0 [ 24.080935] ? selinux_file_ioctl+0x444/0x690 [ 24.085404] ? __fget_light+0x2b2/0x3c0 [ 24.089349] ? ashmem_release+0x190/0x190 [ 24.093469] ? kmem_cache_free+0x258/0x2a0 [ 24.097675] compat_ashmem_ioctl+0x3e/0x50 [ 24.101879] compat_SyS_ioctl+0x151/0x2a30 [ 24.106084] ? do_fast_syscall_32+0x156/0xf9f [ 24.110549] ? ashmem_ioctl+0x11b0/0x11b0 [ 24.114668] ? do_ioctl+0x60/0x60 [ 24.118090] do_fast_syscall_32+0x3ec/0xf9f [ 24.122384] ? do_int80_syscall_32+0x9c0/0x9c0 [ 24.126935] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.131659] ? syscall_return_slowpath+0x550/0x550 [ 24.136559] ? syscall_return_slowpath+0x2ac/0x550 [ 24.141467] ? prepare_exit_to_usermode+0x350/0x350 [ 24.146453] ? sysret32_from_system_call+0x5/0x3c [ 24.151267] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 24.156080] entry_SYSENTER_compat+0x70/0x7f [ 24.160460] RIP: 0023:0xf7f8fc99 [ 24.163793] RSP: 002b:00000000ff8af5ec EFLAGS: 00000282 ORIG_RAX: 0000000000000036 [ 24.171469] RAX: ffff