[ 44.389084] audit: type=1800 audit(1549177740.971:30): pid=8000 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: [ 48.144899] kauditd_printk_skb: 4 callbacks suppressed [ 48.144914] audit: type=1400 audit(1549177744.751:35): avc: denied { map } for pid=8176 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.0.242' (ECDSA) to the list of known hosts. executing program [ 54.923993] audit: type=1400 audit(1549177751.531:36): avc: denied { map } for pid=8188 comm="syz-executor012" path="/root/syz-executor012310825" 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 [ 54.956172] IPVS: ftp: loaded support on port[0] = 21 [ 54.994282] audit: type=1400 audit(1549177751.601:37): avc: denied { map } for pid=8189 comm="syz-executor012" path="/dev/ashmem" dev="devtmpfs" ino=17641 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 [ 55.065643] [ 55.067294] ====================================================== [ 55.073594] WARNING: possible circular locking dependency detected [ 55.079910] 5.0.0-rc4+ #58 Not tainted [ 55.083771] ------------------------------------------------------ [ 55.090070] syz-executor012/8190 is trying to acquire lock: [ 55.095765] 00000000968c09fe (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 55.103560] [ 55.103560] but task is already holding lock: [ 55.109526] 00000000bf8cd5e5 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 55.119145] [ 55.119145] which lock already depends on the new lock. [ 55.119145] [ 55.127457] [ 55.127457] the existing dependency chain (in reverse order) is: [ 55.135051] [ 55.135051] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 55.141801] down_write+0x38/0x90 [ 55.145754] shmem_fallocate+0x15a/0xc60 [ 55.150327] ashmem_shrink_scan+0x1d7/0x4f0 [ 55.155157] ashmem_ioctl+0x2f0/0x11a0 [ 55.159546] do_vfs_ioctl+0xd6e/0x1390 [ 55.163932] ksys_ioctl+0xab/0xd0 [ 55.167893] __x64_sys_ioctl+0x73/0xb0 [ 55.172319] do_syscall_64+0x103/0x610 [ 55.176707] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 55.182393] [ 55.182393] -> #1 (ashmem_mutex){+.+.}: [ 55.187827] __mutex_lock+0xf7/0x1310 [ 55.192125] mutex_lock_nested+0x16/0x20 [ 55.196681] ashmem_mmap+0x55/0x520 [ 55.200807] mmap_region+0xc37/0x1760 [ 55.205114] do_mmap+0x8e2/0x1080 [ 55.209068] vm_mmap_pgoff+0x1c5/0x230 [ 55.213453] ksys_mmap_pgoff+0x4aa/0x630 [ 55.218012] __x64_sys_mmap+0xe9/0x1b0 [ 55.222414] do_syscall_64+0x103/0x610 [ 55.226815] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 55.232499] [ 55.232499] -> #0 (&mm->mmap_sem){++++}: [ 55.238019] lock_acquire+0x16f/0x3f0 [ 55.242318] down_read+0x3b/0x90 [ 55.246184] __do_page_fault+0x9c2/0xd60 [ 55.250759] do_page_fault+0x71/0x581 [ 55.255055] page_fault+0x1e/0x30 [ 55.259026] iov_iter_fault_in_readable+0x377/0x450 [ 55.264574] generic_perform_write+0x195/0x530 [ 55.269653] __generic_file_write_iter+0x25e/0x630 [ 55.275095] generic_file_write_iter+0x360/0x610 [ 55.280349] __vfs_write+0x613/0x8e0 [ 55.284558] vfs_write+0x20c/0x580 [ 55.288595] ksys_write+0xea/0x1f0 [ 55.292637] __x64_sys_write+0x73/0xb0 [ 55.297026] do_syscall_64+0x103/0x610 [ 55.301419] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 55.307105] [ 55.307105] other info that might help us debug this: [ 55.307105] [ 55.315241] Chain exists of: [ 55.315241] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 55.315241] [ 55.326751] Possible unsafe locking scenario: [ 55.326751] [ 55.332780] CPU0 CPU1 [ 55.337419] ---- ---- [ 55.342060] lock(&sb->s_type->i_mutex_key#12); [ 55.346791] lock(ashmem_mutex); [ 55.352735] lock(&sb->s_type->i_mutex_key#12); [ 55.359982] lock(&mm->mmap_sem); [ 55.363497] [ 55.363497] *** DEADLOCK *** [ 55.363497] [ 55.369529] 2 locks held by syz-executor012/8190: [ 55.374342] #0: 0000000074db8b4f (sb_writers#6){.+.+}, at: vfs_write+0x429/0x580 [ 55.381956] #1: 00000000bf8cd5e5 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 55.391995] [ 55.391995] stack backtrace: [ 55.396468] CPU: 1 PID: 8190 Comm: syz-executor012 Not tainted 5.0.0-rc4+ #58 [ 55.403716] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 55.413043] Call Trace: [ 55.415609] dump_stack+0x172/0x1f0 [ 55.419218] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 55.424558] __lock_acquire+0x2f00/0x4700 [ 55.428684] ? mark_held_locks+0x100/0x100 [ 55.432913] ? mark_held_locks+0x100/0x100 [ 55.437127] ? __lock_is_held+0xb6/0x140 [ 55.441189] lock_acquire+0x16f/0x3f0 [ 55.444974] ? __do_page_fault+0x9c2/0xd60 [ 55.449189] down_read+0x3b/0x90 [ 55.452534] ? __do_page_fault+0x9c2/0xd60 [ 55.456759] __do_page_fault+0x9c2/0xd60 [ 55.460804] do_page_fault+0x71/0x581 [ 55.464582] page_fault+0x1e/0x30 [ 55.468015] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 55.473791] 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 [ 55.492672] RSP: 0018:ffff8880957df9b8 EFLAGS: 00010293 [ 55.498009] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020e7e53f [ 55.505270] RDX: 0000000000000000 RSI: ffffffff8328b1e7 RDI: 0000000000000007 [ 55.512520] RBP: ffff8880957dfa58 R08: ffff888094bbc600 R09: fffff9400047470f [ 55.519766] R10: fffff9400047470e R11: ffffea00023a3877 R12: 0000000000001000 [ 55.527014] R13: 0000000000001000 R14: 0000000000000000 R15: ffff8880957dfa30 [ 55.534286] ? iov_iter_fault_in_readable+0x367/0x450 [ 55.539460] ? iov_iter_fault_in_readable+0x367/0x450 [ 55.544628] ? copy_page_from_iter+0x750/0x750 [ 55.549222] generic_perform_write+0x195/0x530 [ 55.553783] ? page_endio+0x780/0x780 [ 55.557562] ? current_time+0x140/0x140 [ 55.561518] ? lock_acquire+0x16f/0x3f0 [ 55.565475] __generic_file_write_iter+0x25e/0x630 [ 55.570381] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 55.575376] generic_file_write_iter+0x360/0x610 [ 55.580115] ? __generic_file_write_iter+0x630/0x630 [ 55.585197] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 55.590711] ? iov_iter_init+0xea/0x220 [ 55.594664] __vfs_write+0x613/0x8e0 [ 55.598394] ? kernel_read+0x120/0x120 [ 55.602281] ? rcu_read_lock_sched_held+0x110/0x130 [ 55.607272] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 55.612003] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 55.617517] ? __sb_start_write+0x1ac/0x360 [ 55.621815] vfs_write+0x20c/0x580 [ 55.625346] ksys_write+0xea/0x1f0 [ 55.628863] ? __ia32_sys_read+0xb0/0xb0 [ 55.632928] ? do_syscall_64+0x26/0x610 [ 55.636885] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 55.642226] ? do_syscall_64+0x26/0x610 [ 55.646176] __x64_sys_write+0x73/0xb0 [ 55.650042] do_syscall_64+0x103/0x610 [ 55.653906] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 55.659087] RIP: 0033:0x446a59 [ 55.662271] Code: e8 2c 19 03 00 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 0c fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 55.681151] RSP: 002b:00007fb4fa8e1ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 55.688832] RAX: ffffffffffffffda RBX: 00000000006dcc48 RCX: 0000000000446a59 [ 55.696080] RDX: 00000000fffffda2 RSI: 0000000020000540 RDI: 0000000000000004 [ 55.703324] RBP: 00000000006dcc40 R08: 0000000000000000 R09: 0000000000000000 [ 55.710567] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dcc4c [ 55.717828] R13: 00007ffd9eb7732f R14: 00007fb4fa8e29c0 R15: 000000000000002d [ 55.760670] kobject: 'batman_adv' (00000000acc862a7): kobject_uevent_env [ 55.767507] kobject: 'batman_adv' (00000000acc862a7): kobject_uevent_env: filter function caused the event to drop! [ 55.778126] kobject: 'batman_adv' (00000000acc862a7): kobject_cleanup, parent (null) [ 55.786904] kobject: 'batman_adv' (00000000acc862a7): calling ktype release [ 55.794030] kobject: (00000000acc862a7): dynamic_kobj_release [ 55.799940] kobject: 'batman_adv': free name [ 55.804476] kobject: 'rx-0' (00000000d69a2828): kobject_cleanup, parent 000000008b8997d3 [ 55.812723] kobject: 'rx-0' (00000000d69a2828): auto cleanup 'remove' event [ 55.820267] kobject: 'rx-0' (00000000d69a2828): kobject_uevent_env [ 55.826611] kobject: 'rx-0' (00000000d69a2828): fill_kobj_path: path = '/devices/virtual/net/syz_tun/queues/rx-0' [ 55.837099] kobject: 'rx-0' (00000000d69a2828): auto cleanup kobject_del [ 55.843973] kobject: 'rx-0' (00000000d69a2828): calling ktype release [ 55.850826] kobject: 'rx-0': free name [ 55.854736] kobject: 'tx-0' (00000000ffbccd84): kobject_cleanup, parent 000000008b8997d3 [ 55.862972] kobject: 'tx-0' (00000000ffbccd84): auto cleanup 'remove' event [ 55.870090] kobject: 'tx-0' (00000000ffbccd84): kobject_uevent_env [ 55.876400] kobject: 'tx-0' (00000000ffbccd84): fill_kobj_path: path = '/devices/virtual/net/syz_tun/queues/tx-0' [ 55.886885] kobject: 'tx-0' (00000000ffbccd84): auto cleanup kobject_del [ 55.893754] kobject: 'tx-0' (00000000ffbccd84): calling ktype release [ 55.900349] kobject: 'tx-0': free name [ 55.904240] kobject: 'queues' (000000008b8997d3): kobject_cleanup, parent (null) [ 55.912650] kobject: 'queues' (000000008b8997d3): calling ktype release [ 55.919421] kobject: 'queues' (000000008b8997d3): kset_release [ 55.925389] kobject: 'queues': free name [ 55.929760] kobject: 'syz_tun' (0000000020b333dc): kobject_uevent_env [ 55.936336] kobject: 'syz_tun' (0000000020b333dc): fill_kobj_path: path = '/devices/virtual/net/syz_tun' [