[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 26.322682] kauditd_printk_skb: 7 callbacks suppressed [ 26.322694] audit: type=1800 audit(1538371187.469:29): pid=5202 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 26.348074] audit: type=1800 audit(1538371187.479:30): pid=5202 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.91' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program syzkaller login: [ 38.311596] [ 38.313343] ====================================================== [ 38.319638] WARNING: possible circular locking dependency detected [ 38.325932] 4.19.0-rc6+ #39 Not tainted [ 38.329877] ------------------------------------------------------ [ 38.336167] syz-executor559/5371 is trying to acquire lock: [ 38.341848] 00000000e34677d1 (&mm->mmap_sem){++++}, at: __do_page_fault+0xb70/0xed0 [ 38.349769] [ 38.349769] but task is already holding lock: [ 38.355724] 00000000b0c242ca (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xed/0x870 [ 38.365340] [ 38.365340] which lock already depends on the new lock. [ 38.365340] [ 38.373637] [ 38.373637] the existing dependency chain (in reverse order) is: [ 38.381240] [ 38.381240] -> #2 (&sb->s_type->i_mutex_key#11){+.+.}: [ 38.387987] down_write+0x8a/0x130 [ 38.392026] shmem_fallocate+0x18b/0x12c0 [ 38.396675] ashmem_shrink_scan+0x238/0x660 [ 38.401501] ashmem_ioctl+0x3ae/0x13a0 [ 38.405894] do_vfs_ioctl+0x1de/0x1720 [ 38.410284] ksys_ioctl+0xa9/0xd0 [ 38.414235] __x64_sys_ioctl+0x73/0xb0 [ 38.418624] do_syscall_64+0x1b9/0x820 [ 38.423018] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.428702] [ 38.428702] -> #1 (ashmem_mutex){+.+.}: [ 38.434144] __mutex_lock+0x166/0x1700 [ 38.438529] mutex_lock_nested+0x16/0x20 [ 38.443090] ashmem_mmap+0x55/0x520 [ 38.447218] mmap_region+0xe82/0x1cd0 [ 38.451603] do_mmap+0xa10/0x1220 [ 38.455746] vm_mmap_pgoff+0x213/0x2c0 [ 38.460139] ksys_mmap_pgoff+0x4da/0x660 [ 38.464704] __x64_sys_mmap+0xe9/0x1b0 [ 38.469140] do_syscall_64+0x1b9/0x820 [ 38.473536] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.479218] [ 38.479218] -> #0 (&mm->mmap_sem){++++}: [ 38.484746] lock_acquire+0x1ed/0x520 [ 38.489049] down_read+0xb0/0x1d0 [ 38.493018] __do_page_fault+0xb70/0xed0 [ 38.497590] do_page_fault+0xf2/0x7e0 [ 38.501892] page_fault+0x1e/0x30 [ 38.505846] iov_iter_fault_in_readable+0x363/0x450 [ 38.511364] generic_perform_write+0x216/0x6a0 [ 38.516452] __generic_file_write_iter+0x26e/0x630 [ 38.521882] generic_file_write_iter+0x436/0x870 [ 38.527135] __vfs_write+0x6b8/0x9f0 [ 38.531348] vfs_write+0x1fc/0x560 [ 38.535386] ksys_write+0x101/0x260 [ 38.539510] __x64_sys_write+0x73/0xb0 [ 38.543901] do_syscall_64+0x1b9/0x820 [ 38.548287] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.553967] [ 38.553967] other info that might help us debug this: [ 38.553967] [ 38.562086] Chain exists of: [ 38.562086] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#11 [ 38.562086] [ 38.573661] Possible unsafe locking scenario: [ 38.573661] [ 38.579704] CPU0 CPU1 [ 38.584348] ---- ---- [ 38.588990] lock(&sb->s_type->i_mutex_key#11); [ 38.593726] lock(ashmem_mutex); [ 38.599672] lock(&sb->s_type->i_mutex_key#11); [ 38.606929] lock(&mm->mmap_sem); [ 38.610446] [ 38.610446] *** DEADLOCK *** [ 38.610446] [ 38.616608] 2 locks held by syz-executor559/5371: [ 38.621424] #0: 0000000012b388bb (sb_writers#5){.+.+}, at: vfs_write+0x42a/0x560 [ 38.629044] #1: 00000000b0c242ca (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xed/0x870 [ 38.639087] [ 38.639087] stack backtrace: [ 38.643563] CPU: 1 PID: 5371 Comm: syz-executor559 Not tainted 4.19.0-rc6+ #39 [ 38.650950] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 38.660299] Call Trace: [ 38.662871] dump_stack+0x1c4/0x2b4 [ 38.666481] ? dump_stack_print_info.cold.2+0x52/0x52 [ 38.671648] ? vprintk_func+0x85/0x181 [ 38.675519] print_circular_bug.isra.33.cold.54+0x1bd/0x27d [ 38.681280] ? save_trace+0xe0/0x290 [ 38.684979] __lock_acquire+0x33e4/0x4ec0 [ 38.689108] ? mark_held_locks+0x130/0x130 [ 38.693325] ? shmem_mfill_atomic_pte+0x28c0/0x28c0 [ 38.698323] ? __switch_to_asm+0x40/0x70 [ 38.702363] ? pud_val+0x88/0x100 [ 38.705793] ? __pmd+0x60/0x60 [ 38.709034] ? __switch_to_asm+0x34/0x70 [ 38.713081] ? __switch_to_asm+0x34/0x70 [ 38.717121] ? __switch_to_asm+0x40/0x70 [ 38.721169] ? __handle_mm_fault+0x9ab/0x53e0 [ 38.725651] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 38.731165] ? __page_mapcount+0x580/0x580 [ 38.735380] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 38.740912] ? __set_page_dirty_no_writeback+0x3c9/0x6c0 [ 38.746341] ? __lock_is_held+0xb5/0x140 [ 38.750379] lock_acquire+0x1ed/0x520 [ 38.754162] ? __do_page_fault+0xb70/0xed0 [ 38.758386] ? lock_release+0x970/0x970 [ 38.762345] ? arch_local_save_flags+0x40/0x40 [ 38.767012] ? find_held_lock+0x36/0x1c0 [ 38.771060] down_read+0xb0/0x1d0 [ 38.774495] ? __do_page_fault+0xb70/0xed0 [ 38.778708] ? __down_interruptible+0x700/0x700 [ 38.783359] ? search_extable+0x80/0xb0 [ 38.787382] ? trim_init_extable+0x3a0/0x3a0 [ 38.791779] ? __bpf_trace_preemptirq_template+0x30/0x30 [ 38.797207] ? iov_iter_fault_in_readable+0x363/0x450 [ 38.802377] __do_page_fault+0xb70/0xed0 [ 38.806418] ? mm_fault_error+0x380/0x380 [ 38.810552] ? balance_dirty_pages_ratelimited+0x1f7/0x23a0 [ 38.816247] ? __sanitizer_cov_trace_const_cmp1+0x1a/0x20 [ 38.821761] ? unlock_page+0x2c2/0x4c0 [ 38.825632] do_page_fault+0xf2/0x7e0 [ 38.829409] ? vmalloc_sync_all+0x30/0x30 [ 38.833535] ? error_entry+0x76/0xd0 [ 38.837228] ? trace_hardirqs_off_caller+0xbb/0x310 [ 38.842220] ? trace_hardirqs_on_caller+0xc0/0x310 [ 38.847130] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 38.851948] ? trace_hardirqs_on_caller+0x310/0x310 [ 38.857055] ? trace_hardirqs_off+0x310/0x310 [ 38.861535] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 38.866360] page_fault+0x1e/0x30 [ 38.869863] RIP: 0010:iov_iter_fault_in_readable+0x363/0x450 [ 38.875650] Code: 00 31 ff 44 89 ee 88 55 98 e8 59 27 f4 fd 45 85 ed 74 c2 e9 7d fe ff ff e8 3a 26 f4 fd 0f 1f 00 0f ae e8 48 8b 85 28 ff ff ff <8a> 00 0f 1f 00 31 ff 89 de 88 85 58 ff ff ff e8 29 27 f4 fd 85 db [ 38.894534] RSP: 0018:ffff8801bf4e77d0 EFLAGS: 00010293 [ 38.900066] RAX: 000000002100053f RBX: 0000000000000000 RCX: ffffffff838a8de2 [ 38.907315] RDX: 0000000000000000 RSI: ffffffff838a8f46 RDI: 0000000000000007 [ 38.914563] RBP: ffff8801bf4e78a8 R08: ffff8801d81b24c0 R09: fffff94000da818e [ 38.921814] R10: fffff94000da818e R11: ffffea0006d40c77 R12: 0000000000000000 [ 38.929065] R13: 0000000000001000 R14: 0000000000001000 R15: ffff8801bf4e7bc8 [ 38.936325] ? iov_iter_fault_in_readable+0x1f2/0x450 [ 38.941494] ? iov_iter_fault_in_readable+0x356/0x450 [ 38.946665] ? copy_page_from_iter+0x8e0/0x8e0 [ 38.951231] ? iov_iter_npages+0xe80/0xe80 [ 38.955452] ? shmem_write_begin+0x110/0x1e0 [ 38.959842] ? shmem_write_begin+0x119/0x1e0 [ 38.964234] generic_perform_write+0x216/0x6a0 [ 38.968797] ? page_endio+0xb60/0xb60 [ 38.972578] ? current_time+0x1b0/0x1b0 [ 38.976545] ? down_write+0x8a/0x130 [ 38.980238] __generic_file_write_iter+0x26e/0x630 [ 38.985149] generic_file_write_iter+0x436/0x870 [ 38.989946] ? __generic_file_write_iter+0x630/0x630 [ 38.995041] ? __kasan_slab_free+0x102/0x150 [ 38.999437] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 39.004960] ? iov_iter_init+0xc2/0x1e0 [ 39.008924] __vfs_write+0x6b8/0x9f0 [ 39.012617] ? kernel_read+0x120/0x120 [ 39.016486] ? __lock_is_held+0xb5/0x140 [ 39.020533] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 39.026156] ? __sb_start_write+0x1b2/0x370 [ 39.030462] vfs_write+0x1fc/0x560 [ 39.033988] ksys_write+0x101/0x260 [ 39.037599] ? __ia32_sys_read+0xb0/0xb0 [ 39.041646] ? __bpf_trace_preemptirq_template+0x30/0x30 [ 39.047083] __x64_sys_write+0x73/0xb0 [ 39.050952] do_syscall_64+0x1b9/0x820 [ 39.054941] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 39.060357] ? syscall_return_slowpath+0x5e0/0x5e0 [ 39.065273] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 39.070094] ? trace_hardirqs_on_caller+0x310/0x310 [ 39.075092] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 39.080092] ? prepare_exit_to_usermode+0x291/0x3b0 [ 39.085095] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 39.089921] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.095093] RIP: 0033:0x446339 executing program [ 39.098270] Code: e8 2c b3 02 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 2b 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 39.117156] RSP: 002b:00007ff3053d5da8 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 39.124900] RAX: ffffffffffffffda RBX: 00000000006dac28 RCX: 0000000000446339 [ 39.132156] RDX: 00000000fffffda2 RSI: 0000000020000540 RDI: 0000000000000003 [ 39.140015] RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000 [ 39.147265] R10: 0000000000000000 R11: 0000000000000293 R12: 00000000006dac2c [ 39.154621] R13: dfdd4f11168a8b2b R14: 6873612f7665642f R15: 00000000006dad2c executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 40.285344] kobject: 'regulatory.0' (000000004f5af2e3): kobject_uevent_env [ 40.292524] kobject: 'regulatory.0' (000000004f5af2e3): fill_kobj_path: path = '/devices/platform/regulatory.0' executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program