[ 38.806102] audit: type=1800 audit(1550799859.467:32): pid=7742 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 op=collect_data cause=failed(directio) comm="startpar" name="ssh" dev="sda1" ino=2417 res=0 [....] 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. [ 39.556767] audit: type=1800 audit(1550799860.287:33): pid=7742 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.37' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program syzkaller login: [ 115.275303] kauditd_printk_skb: 2 callbacks suppressed [ 115.275321] audit: type=1400 audit(1550799935.997:36): avc: denied { map } for pid=7932 comm="syz-executor712" path="/root/syz-executor712951446" dev="sda1" ino=1426 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 115.316588] audit: type=1400 audit(1550799936.017:37): avc: denied { map } for pid=7940 comm="syz-executor712" path="/dev/ashmem" dev="devtmpfs" ino=17238 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 [ 115.329228] hrtimer: interrupt took 52340 ns executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 122.931691] [ 122.933351] ====================================================== [ 122.939660] WARNING: possible circular locking dependency detected [ 122.945975] 5.0.0-rc7+ #82 Not tainted [ 122.949850] ------------------------------------------------------ [ 122.956165] syz-executor712/8382 is trying to acquire lock: [ 122.961871] 00000000ecbf114d (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 122.969690] [ 122.969690] but task is already holding lock: [ 122.975651] 00000000e85ceced (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 122.985294] [ 122.985294] which lock already depends on the new lock. [ 122.985294] [ 122.993601] [ 122.993601] the existing dependency chain (in reverse order) is: [ 123.001215] [ 123.001215] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 123.007990] down_write+0x38/0x90 [ 123.011968] shmem_fallocate+0x15a/0xc60 [ 123.016554] ashmem_shrink_scan+0x1d7/0x4f0 [ 123.021395] ashmem_ioctl+0x2f0/0x11a0 [ 123.025804] do_vfs_ioctl+0xd6e/0x1390 [ 123.030209] ksys_ioctl+0xab/0xd0 [ 123.034184] __x64_sys_ioctl+0x73/0xb0 [ 123.038593] do_syscall_64+0x103/0x610 [ 123.043007] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 123.048711] [ 123.048711] -> #1 (ashmem_mutex){+.+.}: [ 123.054172] __mutex_lock+0xf7/0x1310 [ 123.058494] mutex_lock_nested+0x16/0x20 [ 123.063080] ashmem_mmap+0x55/0x520 [ 123.067232] mmap_region+0xc37/0x1760 [ 123.071554] do_mmap+0x8e2/0x1080 [ 123.075524] vm_mmap_pgoff+0x1c5/0x230 [ 123.079928] ksys_mmap_pgoff+0x4aa/0x630 [ 123.084502] __x64_sys_mmap+0xe9/0x1b0 [ 123.088907] do_syscall_64+0x103/0x610 [ 123.093313] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 123.099010] [ 123.099010] -> #0 (&mm->mmap_sem){++++}: [ 123.104550] lock_acquire+0x16f/0x3f0 [ 123.108863] down_read+0x3b/0x90 [ 123.112742] __do_page_fault+0x9c2/0xd60 [ 123.117318] do_page_fault+0x71/0x581 [ 123.121632] page_fault+0x1e/0x30 [ 123.125602] iov_iter_fault_in_readable+0x377/0x450 [ 123.131134] generic_perform_write+0x195/0x530 [ 123.136233] __generic_file_write_iter+0x25e/0x630 [ 123.141680] generic_file_write_iter+0x360/0x610 [ 123.146951] __vfs_write+0x613/0x8e0 [ 123.151179] vfs_write+0x20c/0x580 [ 123.155229] ksys_write+0xea/0x1f0 [ 123.159293] __x64_sys_write+0x73/0xb0 [ 123.163693] do_syscall_64+0x103/0x610 [ 123.168097] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 123.173791] [ 123.173791] other info that might help us debug this: [ 123.173791] [ 123.181918] Chain exists of: [ 123.181918] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 123.181918] [ 123.193445] Possible unsafe locking scenario: [ 123.193445] [ 123.199485] CPU0 CPU1 [ 123.204483] ---- ---- [ 123.209134] lock(&sb->s_type->i_mutex_key#12); [ 123.213879] lock(ashmem_mutex); [ 123.219838] lock(&sb->s_type->i_mutex_key#12); [ 123.227107] lock(&mm->mmap_sem); [ 123.230633] [ 123.230633] *** DEADLOCK *** [ 123.230633] [ 123.236682] 2 locks held by syz-executor712/8382: [ 123.241504] #0: 00000000a77b1cb8 (sb_writers#6){.+.+}, at: vfs_write+0x429/0x580 [ 123.249137] #1: 00000000e85ceced (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 123.259200] [ 123.259200] stack backtrace: [ 123.263690] CPU: 0 PID: 8382 Comm: syz-executor712 Not tainted 5.0.0-rc7+ #82 [ 123.270955] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 123.280297] Call Trace: [ 123.282887] dump_stack+0x172/0x1f0 [ 123.286515] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 123.291874] __lock_acquire+0x2f00/0x4700 [ 123.296019] ? retint_kernel+0x2d/0x2d [ 123.299904] ? trace_hardirqs_on_caller+0x6a/0x220 [ 123.304831] ? mark_held_locks+0x100/0x100 [ 123.309064] ? iov_iter_fault_in_readable+0x377/0x450 [ 123.314249] ? cmp_ex_sort+0xd0/0xd0 [ 123.317974] ? cmp_ex_search+0x14/0xb0 [ 123.321854] ? __lock_is_held+0xb6/0x140 [ 123.325927] lock_acquire+0x16f/0x3f0 [ 123.329724] ? __do_page_fault+0x9c2/0xd60 [ 123.333956] down_read+0x3b/0x90 [ 123.337318] ? __do_page_fault+0x9c2/0xd60 [ 123.341551] __do_page_fault+0x9c2/0xd60 [ 123.345612] do_page_fault+0x71/0x581 [ 123.349411] page_fault+0x1e/0x30 [ 123.352860] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 123.358649] Code: 89 f6 41 88 57 e0 e8 b8 2b 47 fe 45 85 f6 74 c1 e9 70 fe ff ff e8 29 2a 47 fe 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 85 2b 47 fe 85 db [ 123.377547] RSP: 0018:ffff88808f1c79b8 EFLAGS: 00010293 [ 123.382901] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000002020053f [ 123.390164] RDX: 0000000000000000 RSI: ffffffff8328b757 RDI: 0000000000000007 [ 123.397428] RBP: ffff88808f1c7a58 R08: ffff8880980d2140 R09: fffff94000486be7 [ 123.404893] R10: fffff94000486be6 R11: ffffea0002435f37 R12: 0000000000001000 [ 123.412159] R13: 0000000000001000 R14: 0000000000000000 R15: ffff88808f1c7a30 [ 123.419436] ? iov_iter_fault_in_readable+0x367/0x450 [ 123.424621] ? iov_iter_fault_in_readable+0x367/0x450 [ 123.429805] ? copy_page_from_iter+0x750/0x750 [ 123.434387] generic_perform_write+0x195/0x530 [ 123.438965] ? page_endio+0x780/0x780 [ 123.442763] ? current_time+0x140/0x140 [ 123.446739] __generic_file_write_iter+0x25e/0x630 [ 123.451663] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 123.456674] generic_file_write_iter+0x360/0x610 [ 123.461428] ? __generic_file_write_iter+0x630/0x630 [ 123.466523] ? __vfs_write+0x203/0x8e0 [ 123.470401] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 123.475933] ? iov_iter_init+0xea/0x220 [ 123.479901] __vfs_write+0x613/0x8e0 [ 123.483612] ? kernel_read+0x120/0x120 [ 123.487498] ? rcu_read_lock_sched_held+0x110/0x130 [ 123.492510] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 123.497270] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 123.502821] ? __sb_start_write+0x1ac/0x360 [ 123.507140] vfs_write+0x20c/0x580 [ 123.510677] ksys_write+0xea/0x1f0 [ 123.514211] ? __ia32_sys_read+0xb0/0xb0 [ 123.518280] ? do_syscall_64+0x26/0x610 [ 123.522248] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 123.527617] ? do_syscall_64+0x26/0x610 [ 123.531608] __x64_sys_write+0x73/0xb0 [ 123.535492] do_syscall_64+0x103/0x610 [ 123.539375] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 123.544554] RIP: 0033:0x446599 [ 123.547739] 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 [ 123.566662] RSP: 002b:00007f5fafbdadb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 123.574356] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 0000000000446599 executing program executing program [ 123.581618] RDX: 00000000fffffda2 RSI: 0000000020000540 RDI: 0000000000000005 [ 123.588894] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 [ 123.596164] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c [ 123.603425] R13: 00007fff2aee598f R14: 00007f5fafbdb9c0 R15: 0000000000000000 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program