[?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[ 10.479959] random: crng init done [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.168' (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 executing program executing program syzkaller login: [ 29.013397] [ 29.013839] ====================================================== [ 29.015476] [ INFO: possible circular locking dependency detected ] [ 29.017112] 4.9.154+ #21 Not tainted [ 29.018012] ------------------------------------------------------- [ 29.019716] syz-executor853/2074 is trying to acquire lock: [ 29.021233] (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x7bd/0xa60 [ 29.023583] but task is already holding lock: [ 29.024701] (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [] generic_file_write_iter+0x9a/0x630 [ 29.027547] which lock already depends on the new lock. [ 29.027547] [ 29.029243] [ 29.029243] the existing dependency chain (in reverse order) is: [ 29.031160] -> #2 (&sb->s_type->i_mutex_key#10){+.+.+.}: [ 29.032598] lock_acquire+0x133/0x3d0 [ 29.034011] down_write+0x41/0xa0 [ 29.037981] shmem_fallocate+0x143/0xab0 [ 29.042557] ashmem_shrink_scan+0x1c3/0x4c0 [ 29.047388] ashmem_ioctl+0x29b/0xdd0 [ 29.051721] do_vfs_ioctl+0xb87/0x11d0 [ 29.056120] SyS_ioctl+0x8f/0xc0 executing program [ 29.059996] do_syscall_64+0x1ad/0x570 [ 29.064396] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 29.070002] -> #1 (ashmem_mutex){+.+.+.}: [ 29.074853] lock_acquire+0x133/0x3d0 [ 29.079173] mutex_lock_nested+0xc7/0x920 [ 29.083863] ashmem_mmap+0x53/0x470 [ 29.088005] mmap_region+0x7e7/0xfa0 [ 29.092235] do_mmap+0x539/0xbc0 [ 29.096112] vm_mmap_pgoff+0x179/0x1c0 [ 29.100514] SyS_mmap_pgoff+0xfa/0x1b0 [ 29.104913] SyS_mmap+0x16/0x20 [ 29.108705] do_syscall_64+0x1ad/0x570 executing program [ 29.113104] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 29.118713] -> #0 (&mm->mmap_sem){++++++}: [ 29.123633] __lock_acquire+0x2d10/0x4350 [ 29.128287] lock_acquire+0x133/0x3d0 [ 29.132597] down_read+0x44/0xb0 [ 29.136475] __do_page_fault+0x7bd/0xa60 [ 29.141045] do_page_fault+0x28/0x30 [ 29.145281] page_fault+0x25/0x30 [ 29.149249] generic_perform_write+0x1b6/0x500 [ 29.154349] __generic_file_write_iter+0x340/0x530 executing program [ 29.159794] generic_file_write_iter+0x38a/0x630 [ 29.165060] __vfs_write+0x3c1/0x560 [ 29.169290] vfs_write+0x185/0x520 [ 29.173340] SyS_write+0xdc/0x1c0 [ 29.177302] do_syscall_64+0x1ad/0x570 [ 29.181700] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 29.187305] [ 29.187305] other info that might help us debug this: [ 29.187305] [ 29.195437] Chain exists of: &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#10 [ 29.205266] Possible unsafe locking scenario: [ 29.205266] executing program executing program [ 29.211306] CPU0 CPU1 [ 29.215961] ---- ---- [ 29.220616] lock(&sb->s_type->i_mutex_key#10); [ 29.225767] lock(ashmem_mutex); [ 29.231989] lock(&sb->s_type->i_mutex_key#10); [ 29.239652] lock(&mm->mmap_sem); [ 29.243444] [ 29.243444] *** DEADLOCK *** [ 29.243444] [ 29.249494] 2 locks held by syz-executor853/2074: [ 29.254318] #0: (sb_writers#6){.+.+.+}, at: [] vfs_write+0x3e9/0x520 executing program [ 29.263243] #1: (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [] generic_file_write_iter+0x9a/0x630 [ 29.274596] [ 29.274596] stack backtrace: [ 29.279091] CPU: 1 PID: 2074 Comm: syz-executor853 Not tainted 4.9.154+ #21 [ 29.286180] ffff8801cecb75d8 ffffffff81b47411 ffffffff83cab180 ffffffff83cb4960 [ 29.294206] ffffffff83cc8190 ffffffff8424cd40 ffff8801d0f997c0 ffff8801cecb7630 [ 29.302196] ffffffff813ff088 dffffc0000000000 ffffffff84024b00 ffff8801d0f9a0c0 [ 29.310313] Call Trace: executing program executing program [ 29.312900] [] dump_stack+0xc1/0x120 [ 29.318262] [] print_circular_bug.cold+0x2f6/0x454 [ 29.324835] [] __lock_acquire+0x2d10/0x4350 [ 29.330802] [] ? kasan_alloc_pages+0x38/0x40 [ 29.336945] [] ? trace_hardirqs_on+0x10/0x10 [ 29.342990] [] ? rcu_read_lock_sched_held+0x10b/0x130 [ 29.349802] [] lock_acquire+0x133/0x3d0 [ 29.355416] [] ? __do_page_fault+0x7bd/0xa60 executing program [ 29.361472] [] down_read+0x44/0xb0 [ 29.366650] [] ? __do_page_fault+0x7bd/0xa60 [ 29.372700] [] __do_page_fault+0x7bd/0xa60 [ 29.378577] [] ? debug_lockdep_rcu_enabled+0x71/0xa0 [ 29.385318] [] ? bad_area_access_error+0x3d0/0x3d0 [ 29.391892] [] ? mark_held_locks+0xb1/0x100 [ 29.397859] [] ? shmem_getpage_gfp+0x9dd/0x1b00 [ 29.404172] [] ? trace_hardirqs_off_thunk+0x1a/0x1c executing program executing program [ 29.410827] [] do_page_fault+0x28/0x30 [ 29.416359] [] page_fault+0x25/0x30 [ 29.421628] [] ? iov_iter_fault_in_readable+0x300/0x3d0 [ 29.428639] [] ? iov_iter_fault_in_readable+0x30d/0x3d0 [ 29.435649] [] ? iov_iter_fault_in_readable+0x300/0x3d0 [ 29.442661] [] ? iov_iter_init+0x1d0/0x1d0 [ 29.448544] [] generic_perform_write+0x1b6/0x500 [ 29.454940] [] ? filemap_page_mkwrite+0x280/0x280 executing program [ 29.461421] [] ? current_time+0xd0/0xd0 [ 29.467038] [] __generic_file_write_iter+0x340/0x530 [ 29.473797] [] generic_file_write_iter+0x38a/0x630 [ 29.480369] [] __vfs_write+0x3c1/0x560 [ 29.485900] [] ? bpf_fd_pass+0x270/0x270 [ 29.491611] [] ? __vfs_read+0x550/0x550 [ 29.497234] [] ? rcu_read_lock_sched_held+0x10b/0x130 [ 29.504076] [] ? rcu_sync_lockdep_assert+0x73/0xb0 executing program executing program executing program executing program executing program executing program [ 29.510645] [] ? __sb_start_write+0x161/0x310 [ 29.516872] [] vfs_write+0x185/0x520 [ 29.522226] [] SyS_write+0xdc/0x1c0 [ 29.527493] [] ? SyS_read+0x1c0/0x1c0 [ 29.532934] [] ? do_syscall_64+0x4a/0x570 [ 29.538716] [] ? SyS_read+0x1c0/0x1c0 [ 29.544151] [] do_syscall_64+0x1ad/0x570 [ 29.549856] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program