[ 46.510397] audit: type=1800 audit(1546745316.506:30): pid=8294 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 [....] 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: [ 51.385238] kauditd_printk_skb: 4 callbacks suppressed [ 51.385254] audit: type=1400 audit(1546745321.406:35): avc: denied { map } for pid=8469 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 '10.128.10.13' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 63.966386] audit: type=1400 audit(1546745333.986:36): avc: denied { map } for pid=8481 comm="syz-executor334" path="/root/syz-executor334564948" dev="sda1" ino=16484 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 executing program executing program executing program executing program executing program [ 64.044680] audit: type=1400 audit(1546745333.986:37): avc: denied { map } for pid=8488 comm="syz-executor334" path="/dev/ashmem" dev="devtmpfs" ino=17350 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 65.788354] audit: type=1400 audit(1546745335.806:38): avc: denied { map } for pid=9327 comm="syz-executor334" path="pipe:[28084]" dev="pipefs" ino=28084 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:system_r:kernel_t:s0 tclass=fifo_file permissive=1 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.483119] [ 69.484802] ====================================================== [ 69.491110] WARNING: possible circular locking dependency detected [ 69.497429] 4.20.0+ #11 Not tainted [ 69.501050] ------------------------------------------------------ [ 69.507387] syz-executor334/10845 is trying to acquire lock: [ 69.513176] 000000007c4bec90 (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 69.520991] [ 69.520991] but task is already holding lock: [ 69.526959] 00000000a13e5534 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 69.537083] [ 69.537083] which lock already depends on the new lock. [ 69.537083] [ 69.545389] [ 69.545389] the existing dependency chain (in reverse order) is: [ 69.553024] [ 69.553024] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 69.559801] down_write+0x8a/0x130 [ 69.563876] shmem_fallocate+0x168/0x1200 [ 69.568565] ashmem_shrink_scan+0x239/0x630 [ 69.573425] ashmem_ioctl+0x38a/0x12c0 [ 69.577841] do_vfs_ioctl+0x107b/0x17d0 [ 69.582366] ksys_ioctl+0xab/0xd0 [ 69.586351] __x64_sys_ioctl+0x73/0xb0 [ 69.590778] do_syscall_64+0x1a3/0x800 [ 69.595287] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 69.600996] [ 69.600996] -> #1 (ashmem_mutex){+.+.}: [ 69.606468] __mutex_lock+0x12f/0x1670 [ 69.610896] mutex_lock_nested+0x16/0x20 [ 69.615490] ashmem_mmap+0x55/0x520 [ 69.619656] mmap_region+0xde5/0x1ca0 [ 69.623999] do_mmap+0xa09/0x1220 [ 69.627981] vm_mmap_pgoff+0x20b/0x2b0 [ 69.632402] ksys_mmap_pgoff+0x4f8/0x650 [ 69.636989] __x64_sys_mmap+0xe9/0x1b0 [ 69.641405] do_syscall_64+0x1a3/0x800 [ 69.645816] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 69.651516] [ 69.651516] -> #0 (&mm->mmap_sem){++++}: [ 69.657075] lock_acquire+0x1db/0x570 [ 69.661410] down_read+0x8d/0x120 [ 69.665403] __do_page_fault+0x9c2/0xd60 [ 69.669990] do_page_fault+0xe6/0x7d8 [ 69.674315] page_fault+0x1e/0x30 [ 69.678299] iov_iter_fault_in_readable+0x377/0x450 [ 69.683840] generic_perform_write+0x202/0x6b0 [ 69.688954] __generic_file_write_iter+0x25e/0x630 [ 69.694412] generic_file_write_iter+0x34e/0x6a0 [ 69.699953] __vfs_write+0x764/0xb40 [ 69.704227] vfs_write+0x20c/0x580 [ 69.708294] ksys_write+0x105/0x260 [ 69.712433] __x64_sys_write+0x73/0xb0 [ 69.716850] do_syscall_64+0x1a3/0x800 [ 69.721274] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 69.726978] [ 69.726978] other info that might help us debug this: [ 69.726978] [ 69.735112] Chain exists of: [ 69.735112] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 69.735112] [ 69.746682] Possible unsafe locking scenario: [ 69.746682] [ 69.752751] CPU0 CPU1 [ 69.757430] ---- ---- [ 69.762103] lock(&sb->s_type->i_mutex_key#12); [ 69.766898] lock(ashmem_mutex); [ 69.772871] lock(&sb->s_type->i_mutex_key#12); [ 69.780161] lock(&mm->mmap_sem); [ 69.783699] [ 69.783699] *** DEADLOCK *** [ 69.783699] [ 69.789750] 2 locks held by syz-executor334/10845: [ 69.794677] #0: 000000009ae9e866 (sb_writers#6){.+.+}, at: vfs_write+0x429/0x580 [ 69.802325] #1: 00000000a13e5534 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 69.812409] [ 69.812409] stack backtrace: [ 69.816935] CPU: 1 PID: 10845 Comm: syz-executor334 Not tainted 4.20.0+ #11 [ 69.824042] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 69.833401] Call Trace: [ 69.836000] dump_stack+0x1db/0x2d0 [ 69.839675] ? dump_stack_print_info.cold+0x20/0x20 [ 69.844728] ? print_stack_trace+0x77/0xb0 [ 69.848987] ? vprintk_func+0x86/0x189 [ 69.852910] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 69.858294] __lock_acquire+0x3014/0x4a30 [ 69.862460] ? mark_held_locks+0x100/0x100 [ 69.866705] ? shmem_getpage_gfp+0x197e/0x4b70 [ 69.871299] ? trace_hardirqs_off_caller+0x300/0x300 [ 69.876412] ? do_raw_spin_trylock+0x270/0x270 [ 69.881007] ? shmem_getpage_gfp+0x26fb/0x4b70 [ 69.885614] ? __lock_is_held+0xb6/0x140 [ 69.889695] lock_acquire+0x1db/0x570 [ 69.893506] ? __do_page_fault+0x9c2/0xd60 [ 69.897751] ? ___might_sleep+0x1e7/0x310 [ 69.901914] ? lock_release+0xc40/0xc40 [ 69.905908] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 69.910937] ? cmp_ex_search+0x8c/0xb0 [ 69.914839] down_read+0x8d/0x120 [ 69.918301] ? __do_page_fault+0x9c2/0xd60 [ 69.922543] ? __down_interruptible+0x740/0x740 [ 69.927224] ? do_writepages+0x1a0/0x1a0 [ 69.931293] ? set_page_dirty+0x5dd/0xfc0 [ 69.935454] __do_page_fault+0x9c2/0xd60 [ 69.939527] do_page_fault+0xe6/0x7d8 [ 69.943331] ? unlock_page+0x2b1/0x4a0 [ 69.947224] ? vmalloc_sync_all+0x30/0x30 [ 69.951379] ? balance_dirty_pages_ratelimited+0x1b0/0x2370 [ 69.957106] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 69.961960] page_fault+0x1e/0x30 [ 69.965426] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 69.971232] Code: 89 f6 41 88 57 e0 e8 18 ad f3 fd 45 85 f6 74 c1 e9 70 fe ff ff e8 89 ab f3 fd 0f 1f 00 0f ae e8 44 89 f0 48 8b 8d 68 ff ff ff <8a> 11 89 c3 0f 1f 00 41 88 57 d0 31 ff 89 de e8 e5 ac f3 fd 85 db [ 69.990145] RSP: 0018:ffff888218f678a8 EFLAGS: 00010293 [ 69.995518] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000002006d23f [ 70.002796] RDX: 0000000000000000 RSI: ffffffff838e4d07 RDI: 0000000000000007 [ 70.010072] RBP: ffff888218f67948 R08: ffff888093af2240 R09: fffff940010a7417 [ 70.017346] R10: fffff940010a7416 R11: ffffea000853a0b7 R12: 0000000000001000 [ 70.024624] R13: 0000000000001000 R14: 0000000000000000 R15: ffff888218f67920 [ 70.031986] ? iov_iter_fault_in_readable+0x367/0x450 [ 70.037226] ? iov_iter_fault_in_readable+0x367/0x450 [ 70.042429] ? copy_page_from_iter+0x900/0x900 [ 70.047025] ? shmem_write_begin+0x105/0x1e0 [ 70.051442] ? shmem_write_begin+0x10f/0x1e0 [ 70.055860] generic_perform_write+0x202/0x6b0 [ 70.060470] ? add_page_wait_queue+0x480/0x480 [ 70.065063] ? current_time+0x1b0/0x1b0 [ 70.069049] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 70.074077] ? generic_write_check_limits+0x291/0x380 [ 70.079277] __generic_file_write_iter+0x25e/0x630 [ 70.084210] ? __fget+0x499/0x710 [ 70.087679] generic_file_write_iter+0x34e/0x6a0 [ 70.092541] ? __generic_file_write_iter+0x630/0x630 [ 70.097664] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 70.103215] ? iov_iter_init+0xea/0x220 [ 70.107197] __vfs_write+0x764/0xb40 [ 70.110924] ? kernel_read+0x120/0x120 [ 70.114833] ? rcu_read_lock_sched_held+0x110/0x130 [ 70.119857] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 70.124631] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 70.130181] ? __sb_start_write+0x1ac/0x360 [ 70.134518] vfs_write+0x20c/0x580 [ 70.138066] ksys_write+0x105/0x260 [ 70.141710] ? __ia32_sys_read+0xb0/0xb0 [ 70.145779] ? do_futex+0x2910/0x2910 [ 70.149590] ? trace_hardirqs_off_caller+0x300/0x300 [ 70.154706] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 70.159475] __x64_sys_write+0x73/0xb0 [ 70.163374] do_syscall_64+0x1a3/0x800 [ 70.167274] ? syscall_return_slowpath+0x5f0/0x5f0 [ 70.172220] ? prepare_exit_to_usermode+0x232/0x3b0 [ 70.177255] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 70.182119] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 70.187314] RIP: 0033:0x4464e9 [ 70.190514] Code: e8 0c e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 70.209423] RSP: 002b:00007f3302123da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 70.217143] RAX: ffffffffffffffda RBX: 00000000006dcc28 RCX: 00000000004464e9 [ 70.224413] RDX: 00000000fffffe48 RSI: 0000000020004240 RDI: 0000000000000004 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 70.231681] RBP: 00000000006dcc20 R08: 0000000000000000 R09: 0000000000000000 [ 70.238975] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dcc2c [ 70.246254] R13: 656363615f6c6361 R14: 5f7869736f70275b R15: 00000000006dcd2c executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program