[....] Starting enhanced syslogd: rsyslogd[ 12.764066] audit: type=1400 audit(1513320891.522:5): avc: denied { syslog } for pid=2993 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [?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. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 18.858535] audit: type=1400 audit(1513320897.617:6): avc: denied { map } for pid=3133 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 Warning: Permanently added 'ci-upstream-mmots-kasan-gce-8,10.128.15.219' (ECDSA) to the list of known hosts. [ 25.155347] audit: type=1400 audit(1513320903.914:7): avc: denied { map } for pid=3147 comm="syz-execprog" path="/root/syz-execprog" dev="sda1" ino=16479 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 2017/12/15 06:55:04 parsed 1 programs 2017/12/15 06:55:04 executed programs: 0 [ 25.634847] audit: type=1400 audit(1513320904.393:8): avc: denied { map } for pid=3147 comm="syz-execprog" path="/root/syzkaller-shm656469374" dev="sda1" ino=16482 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:file_t:s0 tclass=file permissive=1 [ 28.610683] [ 28.612321] ====================================================== [ 28.618602] WARNING: possible circular locking dependency detected [ 28.624885] 4.15.0-rc2-mm1+ #39 Not tainted [ 28.629169] ------------------------------------------------------ [ 28.635448] syz-executor0/3387 is trying to acquire lock: [ 28.640948] (event_mutex){+.+.}, at: [<0000000079828d3d>] perf_trace_destroy+0x28/0x100 [ 28.649149] [ 28.649149] but task is already holding lock: [ 28.655090] (&mm->mmap_sem){++++}, at: [<00000000c1fecfd0>] vm_mmap_pgoff+0x198/0x280 [ 28.663116] [ 28.663116] which lock already depends on the new lock. [ 28.663116] [ 28.671401] [ 28.671401] the existing dependency chain (in reverse order) is: [ 28.678986] [ 28.678986] -> #7 (&mm->mmap_sem){++++}: [ 28.684497] lock_acquire+0x1d5/0x580 [ 28.688784] __might_fault+0x13a/0x1d0 [ 28.693168] _copy_to_user+0x2c/0xc0 [ 28.697366] filldir+0x1a7/0x320 [ 28.701218] dcache_readdir+0x12d/0x5e0 [ 28.705686] iterate_dir+0x1ca/0x540 [ 28.709883] SyS_getdents+0x225/0x450 [ 28.714170] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 28.719409] [ 28.719409] -> #6 (&sb->s_type->i_mutex_key#5){++++}: [ 28.726045] __schedule+0x8f3/0x2060 [ 28.730241] schedule+0xf5/0x430 [ 28.734093] devtmpfsd+0x420/0x4b0 [ 28.738118] kthread+0x37a/0x440 [ 28.741969] ret_from_fork+0x24/0x30 [ 28.746167] [ 28.746167] -> #5 ((completion)&req.done){+.+.}: [ 28.752376] lock_acquire+0x1d5/0x580 [ 28.756659] wait_for_completion+0xcb/0x7b0 [ 28.761464] devtmpfs_create_node+0x32b/0x4a0 [ 28.766443] device_add+0x120f/0x1640 [ 28.770730] device_create_groups_vargs+0x1f3/0x250 [ 28.776230] device_create+0xda/0x110 [ 28.780517] msr_device_create+0x26/0x40 [ 28.785063] cpuhp_invoke_callback+0x2ea/0x1d20 [ 28.790215] cpuhp_thread_fun+0x48e/0x7e0 [ 28.794847] smpboot_thread_fn+0x450/0x7c0 [ 28.799564] kthread+0x37a/0x440 [ 28.803415] ret_from_fork+0x24/0x30 [ 28.807609] [ 28.807609] -> #4 (cpuhp_state-up){+.+.}: [ 28.813202] lock_acquire+0x1d5/0x580 [ 28.817486] cpuhp_issue_call+0x1e5/0x520 [ 28.822117] __cpuhp_setup_state_cpuslocked+0x282/0x600 [ 28.827966] __cpuhp_setup_state+0xb0/0x140 [ 28.832775] page_writeback_init+0x4d/0x71 [ 28.837493] pagecache_init+0x48/0x4f [ 28.841778] start_kernel+0x6c1/0x754 [ 28.846062] x86_64_start_reservations+0x2a/0x2c [ 28.851301] x86_64_start_kernel+0x77/0x7a [ 28.856033] secondary_startup_64+0xa5/0xb0 [ 28.860839] [ 28.860839] -> #3 (cpuhp_state_mutex){+.+.}: [ 28.866691] lock_acquire+0x1d5/0x580 [ 28.870975] __mutex_lock+0x16f/0x1a80 [ 28.875346] mutex_lock_nested+0x16/0x20 [ 28.879891] __cpuhp_setup_state_cpuslocked+0x5b/0x600 [ 28.885653] __cpuhp_setup_state+0xb0/0x140 [ 28.890461] kvm_guest_init+0x1f3/0x20f [ 28.894931] setup_arch+0x17e8/0x1a02 [ 28.899216] start_kernel+0xa5/0x754 [ 28.903414] x86_64_start_reservations+0x2a/0x2c [ 28.908654] x86_64_start_kernel+0x77/0x7a [ 28.913373] secondary_startup_64+0xa5/0xb0 [ 28.918177] [ 28.918177] -> #2 (cpu_hotplug_lock.rw_sem){++++}: [ 28.924553] lock_acquire+0x1d5/0x580 [ 28.928837] cpus_read_lock+0x42/0x90 [ 28.933132] static_key_slow_inc+0x9d/0x3c0 [ 28.937940] tracepoint_probe_register_prio+0x80d/0x9a0 [ 28.943787] tracepoint_probe_register+0x2a/0x40 [ 28.949029] trace_event_reg+0x167/0x320 [ 28.953575] perf_trace_init+0x4ef/0xab0 [ 28.958125] perf_tp_event_init+0x7d/0xf0 [ 28.962769] perf_try_init_event+0xc9/0x1f0 [ 28.967588] perf_event_alloc+0x1cc6/0x2b00 [ 28.972394] SYSC_perf_event_open+0x84e/0x2e00 [ 28.977461] SyS_perf_event_open+0x39/0x50 [ 28.982180] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 28.987416] [ 28.987416] -> #1 (tracepoints_mutex){+.+.}: [ 28.993269] lock_acquire+0x1d5/0x580 [ 28.997554] __mutex_lock+0x16f/0x1a80 [ 29.001934] mutex_lock_nested+0x16/0x20 [ 29.006481] tracepoint_probe_register_prio+0xa0/0x9a0 [ 29.012243] tracepoint_probe_register+0x2a/0x40 [ 29.017484] trace_event_reg+0x167/0x320 [ 29.022029] perf_trace_init+0x4ef/0xab0 [ 29.026575] perf_tp_event_init+0x7d/0xf0 [ 29.031205] perf_try_init_event+0xc9/0x1f0 [ 29.036019] perf_event_alloc+0x1cc6/0x2b00 [ 29.040825] SYSC_perf_event_open+0x84e/0x2e00 [ 29.045890] SyS_perf_event_open+0x39/0x50 [ 29.050610] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 29.055848] [ 29.055848] -> #0 (event_mutex){+.+.}: [ 29.061182] __lock_acquire+0x3498/0x47f0 [ 29.065816] lock_acquire+0x1d5/0x580 [ 29.070100] __mutex_lock+0x16f/0x1a80 [ 29.074484] mutex_lock_nested+0x16/0x20 [ 29.079029] perf_trace_destroy+0x28/0x100 [ 29.083748] tp_perf_event_destroy+0x15/0x20 [ 29.088640] _free_event+0x3bd/0x10f0 [ 29.092924] put_event+0x24/0x30 [ 29.096784] perf_mmap_close+0x60d/0x1010 [ 29.101417] remove_vma+0xb4/0x1b0 [ 29.105441] do_munmap+0x82a/0xdf0 [ 29.109465] mmap_region+0x59e/0x15a0 [ 29.113747] do_mmap+0x6c6/0xe10 [ 29.117598] vm_mmap_pgoff+0x1de/0x280 [ 29.121969] SyS_mmap_pgoff+0x23b/0x5f0 [ 29.126427] SyS_mmap+0x16/0x20 [ 29.130193] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 29.135431] [ 29.135431] other info that might help us debug this: [ 29.135431] [ 29.143536] Chain exists of: [ 29.143536] event_mutex --> &sb->s_type->i_mutex_key#5 --> &mm->mmap_sem [ 29.143536] [ 29.154864] Possible unsafe locking scenario: [ 29.154864] [ 29.160884] CPU0 CPU1 [ 29.165512] ---- ---- [ 29.170142] lock(&mm->mmap_sem); [ 29.173645] lock(&sb->s_type->i_mutex_key#5); [ 29.180805] lock(&mm->mmap_sem); [ 29.186828] lock(event_mutex); [ 29.190160] [ 29.190160] *** DEADLOCK *** [ 29.190160] [ 29.196182] 1 lock held by syz-executor0/3387: [ 29.200724] #0: (&mm->mmap_sem){++++}, at: [<00000000c1fecfd0>] vm_mmap_pgoff+0x198/0x280 [ 29.209197] [ 29.209197] stack backtrace: [ 29.213657] CPU: 0 PID: 3387 Comm: syz-executor0 Not tainted 4.15.0-rc2-mm1+ #39 [ 29.221151] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.230469] Call Trace: [ 29.233026] dump_stack+0x194/0x257 [ 29.236620] ? arch_local_irq_restore+0x53/0x53 [ 29.241255] print_circular_bug+0x42d/0x610 [ 29.245539] ? save_stack_trace+0x1a/0x20 [ 29.249655] check_prev_add+0x666/0x15f0 [ 29.253681] ? __save_stack_trace+0x61/0xd0 [ 29.257964] ? copy_trace+0x150/0x150 [ 29.261732] ? check_usage+0xb60/0xb60 [ 29.265582] ? save_stack_trace+0x1a/0x20 [ 29.269693] ? __lock_acquire+0x324e/0x47f0 [ 29.273981] __lock_acquire+0x3498/0x47f0 [ 29.278092] ? __lock_acquire+0x3498/0x47f0 [ 29.282381] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 29.287535] ? do_munmap+0x82a/0xdf0 [ 29.291212] ? __unwind_start+0x169/0x330 [ 29.295327] ? __kernel_text_address+0xd/0x40 [ 29.299789] ? unwind_next_frame.part.6+0x1a6/0xb40 [ 29.304769] ? unwind_next_frame.part.6+0x1a6/0xb40 [ 29.309751] ? unwind_dump+0x4d0/0x4d0 [ 29.313604] ? check_noncircular+0x20/0x20 [ 29.317802] ? unwind_dump+0x4d0/0x4d0 [ 29.321653] ? __read_once_size_nocheck.constprop.8+0x10/0x10 [ 29.327501] ? find_held_lock+0x39/0x1d0 [ 29.331526] ? do_mmap+0x6c6/0xe10 [ 29.335039] ? check_noncircular+0x20/0x20 [ 29.339241] ? perf_event_detach_bpf_prog+0x92/0x3d0 [ 29.344309] lock_acquire+0x1d5/0x580 [ 29.348072] ? perf_trace_destroy+0x28/0x100 [ 29.352445] ? lock_release+0xda0/0xda0 [ 29.356385] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 29.362232] ? perf_event_detach_bpf_prog+0x92/0x3d0 [ 29.367300] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 29.372456] ? rcu_note_context_switch+0x710/0x710 [ 29.377349] ? __might_sleep+0x95/0x190 [ 29.381286] ? perf_trace_destroy+0x28/0x100 [ 29.385660] __mutex_lock+0x16f/0x1a80 [ 29.389511] ? perf_trace_destroy+0x28/0x100 [ 29.393884] ? find_held_lock+0x39/0x1d0 [ 29.397911] ? perf_trace_destroy+0x28/0x100 [ 29.402287] ? mutex_lock_io_nested+0x1900/0x1900 [ 29.407094] ? lock_downgrade+0x980/0x980 [ 29.411206] ? lock_acquire+0x1d5/0x580 [ 29.415144] ? check_noncircular+0x20/0x20 [ 29.419343] ? lock_release+0xda0/0xda0 [ 29.423281] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 29.429130] ? perf_mmap_close+0x33f/0x1010 [ 29.433420] ? find_held_lock+0x39/0x1d0 [ 29.437447] ? __mutex_unlock_slowpath+0xe9/0xac0 [ 29.442265] ? print_usage_bug+0x3f0/0x3f0 [ 29.446465] ? wait_for_completion+0x7b0/0x7b0 [ 29.451024] ? __wake_up_common+0x42b/0x770 [ 29.455311] ? check_noncircular+0x20/0x20 [ 29.459509] ? find_held_lock+0x39/0x1d0 [ 29.463535] ? perf_addr_filters_splice+0x18f/0x810 [ 29.468518] ? free_filters_list+0x2f0/0x2f0 [ 29.472891] ? mutex_unlock+0xd/0x10 [ 29.476569] ? __lock_is_held+0xbc/0x140 [ 29.480596] mutex_lock_nested+0x16/0x20 [ 29.484623] ? mutex_lock_nested+0x16/0x20 [ 29.488821] perf_trace_destroy+0x28/0x100 [ 29.493020] ? perf_tp_event_init+0xf0/0xf0 [ 29.497306] tp_perf_event_destroy+0x15/0x20 [ 29.501692] _free_event+0x3bd/0x10f0 [ 29.505457] ? ring_buffer_attach+0x830/0x830 [ 29.509916] ? wait_for_completion+0x7b0/0x7b0 [ 29.514463] ? ring_buffer_put+0x140/0x140 [ 29.518678] ? lock_release+0xda0/0xda0 [ 29.522617] ? atomic_dec_and_mutex_lock+0x112/0x150 [ 29.528191] ? atomic_dec_and_mutex_lock+0x112/0x150 [ 29.533268] put_event+0x24/0x30 [ 29.536599] perf_mmap_close+0x60d/0x1010 [ 29.540714] ? perf_compat_ioctl+0x70/0x70 [ 29.544913] ? save_stack+0x43/0xd0 [ 29.548506] ? check_noncircular+0x20/0x20 [ 29.552704] ? do_munmap+0x82a/0xdf0 [ 29.556381] ? mmap_region+0x59e/0x15a0 [ 29.560317] ? do_mmap+0x6c6/0xe10 [ 29.563821] ? SyS_mmap_pgoff+0x23b/0x5f0 [ 29.567931] ? SyS_mmap+0x16/0x20 [ 29.571351] ? entry_SYSCALL_64_fastpath+0x1f/0x96 [ 29.576245] ? unmap_region+0x35c/0x4f0 [ 29.580183] ? up_read+0x40/0x40 [ 29.583513] ? check_noncircular+0x20/0x20 [ 29.587715] ? print_usage_bug+0x3f0/0x3f0 [ 29.591913] ? reusable_anon_vma+0x560/0x560 [ 29.596287] ? __lock_is_held+0xbc/0x140 [ 29.600323] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 29.606172] ? rcu_note_context_switch+0x710/0x710 [ 29.611071] ? __might_sleep+0x95/0x190 [ 29.615009] ? perf_compat_ioctl+0x70/0x70 [ 29.619207] remove_vma+0xb4/0x1b0 [ 29.622711] do_munmap+0x82a/0xdf0 [ 29.626218] mmap_region+0x59e/0x15a0 [ 29.629986] ? SyS_brk+0x6f0/0x6f0 [ 29.633492] ? arch_get_unmapped_area_topdown+0xba/0x7d0 [ 29.638906] ? arch_get_unmapped_area+0x750/0x750 [ 29.643711] ? lock_acquire+0x1d5/0x580 [ 29.647686] ? vm_mmap_pgoff+0x198/0x280 [ 29.651713] ? filp_close+0x1a1/0x240 [ 29.655479] ? selinux_mmap_addr+0x1f/0xf0 [ 29.659678] ? security_mmap_addr+0x79/0xa0 [ 29.663963] ? get_unmapped_area+0x265/0x300 [ 29.668336] do_mmap+0x6c6/0xe10 [ 29.671667] ? mmap_region+0x15a0/0x15a0 [ 29.675690] ? vm_mmap_pgoff+0x198/0x280 [ 29.679715] ? down_read_killable+0x180/0x180 [ 29.684173] ? security_mmap_file+0x143/0x180 [ 29.688633] vm_mmap_pgoff+0x1de/0x280 [ 29.692486] ? vma_is_stack_for_current+0xa0/0xa0 [ 29.697294] ? _raw_spin_unlock_irq+0x27/0x70 [ 29.701754] ? SyS_futex+0x269/0x390 [ 29.705431] SyS_mmap_pgoff+0x23b/0x5f0 [ 29.709372] ? find_mergeable_anon_vma+0xd0/0xd0 [ 29.714093] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 29.719073] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 29.723793] SyS_mmap+0x16/0x20 [ 29.727035] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 29.731753] RIP: 0033:0x452a39 [ 29.734908] RSP: 002b:00007f30b6730c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000009 [ 29.742582] RAX: ffffffffffffffda RBX: 00007f30b6731700 RCX: 0000000000452a39 [ 29.749817] RDX: 0000000000000003 RSI: 0000000000292000 RDI: 0000000020000000 [ 29.757060] RBP: 00007ffc308b8680 R08: ffffffffffffffff R09: 0000000000000000 [ 29.764296] R10: 0000000000000032 R11: 0000000000000212 R12: 0000000000000000 [ 29.771529] R13: 00007ffc308b85ff R14: 00007f30b67319c0 R15: 0000000000000007 2017/12/15 06:55:09 executed programs: 75 2017/12/15 06:55:14 executed programs: 181