[?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. [ 17.633142] audit: type=1400 audit(1519638795.750:6): avc: denied { map } for pid=4146 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.203' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 23.936093] audit: type=1400 audit(1519638802.053:7): avc: denied { map } for pid=4160 comm="syzkaller802316" path="/root/syzkaller802316786" 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.939461] [ 23.962032] audit: type=1400 audit(1519638802.054:8): avc: denied { map } for pid=4160 comm="syzkaller802316" path="/dev/ashmem" dev="devtmpfs" ino=9536 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.963586] ====================================================== [ 23.963589] WARNING: possible circular locking dependency detected [ 23.963593] 4.16.0-rc2+ #239 Not tainted [ 23.963595] ------------------------------------------------------ [ 23.963599] syzkaller802316/4160 is trying to acquire lock: [ 23.963603] (&mm->mmap_sem){++++}, at: [<000000003f29f28e>] __might_fault+0xe0/0x1d0 [ 24.024780] [ 24.024780] but task is already holding lock: [ 24.030716] (ashmem_mutex){+.+.}, at: [<00000000b992afe3>] ashmem_ioctl+0x3db/0x11b0 [ 24.038659] [ 24.038659] which lock already depends on the new lock. [ 24.038659] [ 24.046944] [ 24.046944] the existing dependency chain (in reverse order) is: [ 24.054533] [ 24.054533] -> #1 (ashmem_mutex){+.+.}: [ 24.059964] __mutex_lock+0x16f/0x1a80 [ 24.064342] mutex_lock_nested+0x16/0x20 [ 24.068892] ashmem_mmap+0x53/0x410 [ 24.073013] mmap_region+0xa99/0x15a0 [ 24.077301] do_mmap+0x6c0/0xe00 [ 24.081156] vm_mmap_pgoff+0x1de/0x280 [ 24.085530] SyS_mmap_pgoff+0x462/0x5f0 [ 24.089994] do_fast_syscall_32+0x3ec/0xf9f [ 24.094806] entry_SYSENTER_compat+0x70/0x7f [ 24.099708] [ 24.099708] -> #0 (&mm->mmap_sem){++++}: [ 24.105222] lock_acquire+0x1d5/0x580 [ 24.109515] __might_fault+0x13a/0x1d0 [ 24.113893] _copy_from_user+0x2c/0x110 [ 24.118356] ashmem_ioctl+0x438/0x11b0 [ 24.122734] compat_ashmem_ioctl+0x3e/0x50 [ 24.127458] compat_SyS_ioctl+0x151/0x2a30 [ 24.132185] do_fast_syscall_32+0x3ec/0xf9f [ 24.136995] entry_SYSENTER_compat+0x70/0x7f [ 24.141890] [ 24.141890] other info that might help us debug this: [ 24.141890] [ 24.149999] Possible unsafe locking scenario: [ 24.149999] [ 24.156028] CPU0 CPU1 [ 24.160667] ---- ---- [ 24.165297] lock(ashmem_mutex); [ 24.168720] lock(&mm->mmap_sem); [ 24.174742] lock(ashmem_mutex); [ 24.180678] lock(&mm->mmap_sem); [ 24.184183] [ 24.184183] *** DEADLOCK *** [ 24.184183] [ 24.190208] 1 lock held by syzkaller802316/4160: [ 24.194927] #0: (ashmem_mutex){+.+.}, at: [<00000000b992afe3>] ashmem_ioctl+0x3db/0x11b0 [ 24.203309] [ 24.203309] stack backtrace: [ 24.207775] CPU: 0 PID: 4160 Comm: syzkaller802316 Not tainted 4.16.0-rc2+ #239 [ 24.215188] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.224509] Call Trace: [ 24.227069] dump_stack+0x194/0x24d [ 24.230665] ? arch_local_irq_restore+0x53/0x53 [ 24.235309] print_circular_bug.isra.38+0x2cd/0x2dc [ 24.240294] ? save_trace+0xe0/0x2b0 [ 24.243981] __lock_acquire+0x30a8/0x3e00 [ 24.248104] ? ashmem_ioctl+0x3db/0x11b0 [ 24.252145] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.257306] ? __might_sleep+0x95/0x190 [ 24.261250] ? ashmem_ioctl+0x3db/0x11b0 [ 24.265283] ? __mutex_lock+0x16f/0x1a80 [ 24.269312] ? ashmem_ioctl+0x3db/0x11b0 [ 24.273341] ? ashmem_ioctl+0x3db/0x11b0 [ 24.277373] ? mutex_lock_io_nested+0x1900/0x1900 [ 24.282197] ? lock_release+0xa40/0xa40 [ 24.286141] ? vma_wants_writenotify+0x51/0x3b0 [ 24.290777] ? vma_set_page_prot+0x16b/0x230 [ 24.295157] ? avc_ss_reset+0x110/0x110 [ 24.299103] lock_acquire+0x1d5/0x580 [ 24.302871] ? lock_acquire+0x1d5/0x580 [ 24.306816] ? __might_fault+0xe0/0x1d0 [ 24.310760] ? userfaultfd_unmap_complete+0x327/0x510 [ 24.315918] ? lock_release+0xa40/0xa40 [ 24.319867] ? trace_event_raw_event_sched_switch+0x810/0x810 [ 24.325721] ? __might_sleep+0x95/0x190 [ 24.329667] __might_fault+0x13a/0x1d0 [ 24.333524] ? __might_fault+0xe0/0x1d0 [ 24.337469] _copy_from_user+0x2c/0x110 [ 24.341419] ashmem_ioctl+0x438/0x11b0 [ 24.345277] ? selinux_file_ioctl+0x444/0x690 [ 24.349744] ? __fget_light+0x2b2/0x3c0 [ 24.353686] ? ashmem_release+0x190/0x190 [ 24.357805] ? kmem_cache_free+0x258/0x2a0 [ 24.362010] compat_ashmem_ioctl+0x3e/0x50 [ 24.366217] compat_SyS_ioctl+0x151/0x2a30 [ 24.370423] ? do_fast_syscall_32+0x156/0xf9f [ 24.374884] ? ashmem_ioctl+0x11b0/0x11b0 [ 24.379001] ? do_ioctl+0x60/0x60 [ 24.382424] do_fast_syscall_32+0x3ec/0xf9f [ 24.386716] ? do_int80_syscall_32+0x9c0/0x9c0 [ 24.391266] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.395991] ? syscall_return_slowpath+0x550/0x550 [ 24.400891] ? syscall_return_slowpath+0x2ac/0x550 [ 24.405789] ? prepare_exit_to_usermode+0x350/0x350 [ 24.410776] ? sysret32_from_system_call+0x5/0x3c [ 24.415587] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 24.420402] entry_SYSENTER_compat+0x70/0x7f [ 24.424777] RIP: 0023:0xf7f29c99 [ 24.428108] RSP: 002b:00000000ffcddaec EFLAGS: 00000282 ORIG_RAX: 0000000000000036 [ 24.435782] RAX: ffffffffff