[ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... [ OK ] Started Update UTMP about System Runlevel Changes. Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.92' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 559.427000] hfsplus: failed to load root directory [ 559.474089] [ 559.475784] ====================================================== [ 559.482098] WARNING: possible circular locking dependency detected [ 559.488488] 4.19.211-syzkaller #0 Not tainted [ 559.492957] ------------------------------------------------------ [ 559.499262] syz-executor374/8127 is trying to acquire lock: [ 559.504948] 000000003bd561fa (&tree->tree_lock){+.+.}, at: hfsplus_file_truncate+0xde7/0x1040 [ 559.513605] [ 559.513605] but task is already holding lock: [ 559.519558] 00000000f2354500 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 559.529514] [ 559.529514] which lock already depends on the new lock. [ 559.529514] [ 559.537808] [ 559.537808] the existing dependency chain (in reverse order) is: [ 559.546618] [ 559.546618] -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}: [ 559.553711] hfsplus_get_block+0x292/0x960 [ 559.558512] block_read_full_page+0x288/0xd10 [ 559.563508] do_read_cache_page+0x533/0x1170 [ 559.568418] __hfs_bnode_create+0x5b7/0xb60 [ 559.573240] hfsplus_bnode_find+0x2aa/0xb80 [ 559.578065] hfsplus_brec_find+0x2af/0x500 [ 559.582799] hfsplus_brec_read+0x28/0x120 [ 559.587447] hfsplus_find_cat+0x1d0/0x480 [ 559.592096] hfsplus_iget+0x400/0x790 [ 559.596401] hfsplus_fill_super+0xc5f/0x19e0 [ 559.601308] mount_bdev+0x2fc/0x3b0 [ 559.605433] mount_fs+0xa3/0x310 [ 559.609303] vfs_kern_mount.part.0+0x68/0x470 [ 559.614298] do_mount+0x115c/0x2f50 [ 559.618427] ksys_mount+0xcf/0x130 [ 559.622470] __x64_sys_mount+0xba/0x150 [ 559.626944] do_syscall_64+0xf9/0x620 [ 559.631245] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 559.636928] [ 559.636928] -> #0 (&tree->tree_lock){+.+.}: [ 559.642715] __mutex_lock+0xd7/0x1190 [ 559.647018] hfsplus_file_truncate+0xde7/0x1040 [ 559.652197] hfsplus_delete_inode+0x18d/0x220 [ 559.657216] hfsplus_unlink+0x595/0x820 [ 559.661867] hfsplus_rename+0xbe/0x200 [ 559.666431] vfs_rename+0x67e/0x1bc0 [ 559.670642] do_renameat2+0xb59/0xc70 [ 559.674952] __x64_sys_rename+0x5d/0x80 [ 559.679427] do_syscall_64+0xf9/0x620 [ 559.683728] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 559.689413] [ 559.689413] other info that might help us debug this: [ 559.689413] [ 559.697534] Possible unsafe locking scenario: [ 559.697534] [ 559.703568] CPU0 CPU1 [ 559.708208] ---- ---- [ 559.712847] lock(&HFSPLUS_I(inode)->extents_lock); [ 559.717932] lock(&tree->tree_lock); [ 559.724224] lock(&HFSPLUS_I(inode)->extents_lock); [ 559.731820] lock(&tree->tree_lock); [ 559.735596] [ 559.735596] *** DEADLOCK *** [ 559.735596] [ 559.741640] 6 locks held by syz-executor374/8127: [ 559.746454] #0: 00000000414d9562 (sb_writers#11){.+.+}, at: mnt_want_write+0x3a/0xb0 [ 559.754411] #1: 000000002107836a (&type->i_mutex_dir_key#7/1){+.+.}, at: lock_rename+0x225/0x280 [ 559.763410] #2: 000000008137c92f (&sb->s_type->i_mutex_key#17){+.+.}, at: lock_two_nondirectories+0xec/0x110 [ 559.773451] #3: 000000006fc6dafd (&sb->s_type->i_mutex_key#17/4){+.+.}, at: lock_two_nondirectories+0xd1/0x110 [ 559.783669] #4: 00000000d1f5b90d (&sbi->vh_mutex){+.+.}, at: hfsplus_unlink+0x140/0x820 [ 559.791885] #5: 00000000f2354500 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 559.802269] [ 559.802269] stack backtrace: [ 559.806748] CPU: 1 PID: 8127 Comm: syz-executor374 Not tainted 4.19.211-syzkaller #0 [ 559.814606] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 559.823935] Call Trace: [ 559.826511] dump_stack+0x1fc/0x2ef [ 559.830125] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 559.835905] __lock_acquire+0x30c9/0x3ff0 [ 559.840037] ? mark_held_locks+0xf0/0xf0 [ 559.844083] ? check_preemption_disabled+0x41/0x280 [ 559.849082] ? calc_wheel_index+0x6a/0x230 [ 559.853297] ? trace_hardirqs_off+0x64/0x200 [ 559.857688] ? hfsplus_block_free+0x42f/0x5d0 [ 559.862175] lock_acquire+0x170/0x3c0 [ 559.865957] ? hfsplus_file_truncate+0xde7/0x1040 [ 559.870782] ? hfsplus_file_truncate+0xde7/0x1040 [ 559.875604] __mutex_lock+0xd7/0x1190 [ 559.879392] ? hfsplus_file_truncate+0xde7/0x1040 [ 559.884218] ? wait_for_completion_io+0x10/0x10 [ 559.888875] ? hfsplus_file_truncate+0xde7/0x1040 [ 559.893715] ? mutex_trylock+0x1a0/0x1a0 [ 559.897758] ? hfsplus_block_free+0x434/0x5d0 [ 559.902236] ? hfsplus_free_extents+0x17b/0x520 [ 559.906889] hfsplus_file_truncate+0xde7/0x1040 [ 559.911539] ? hfsplus_delete_cat+0x129/0xe30 [ 559.916016] ? hfsplus_get_block+0x960/0x960 [ 559.920410] hfsplus_delete_inode+0x18d/0x220 [ 559.924976] hfsplus_unlink+0x595/0x820 [ 559.928936] ? hfsplus_symlink+0x2e0/0x2e0 [ 559.933152] ? lock_acquire+0x170/0x3c0 [ 559.937109] ? lock_two_nondirectories+0xd1/0x110 [ 559.941933] hfsplus_rename+0xbe/0x200 [ 559.945803] ? down_write_nested+0x36/0x90 [ 559.950026] ? lock_two_nondirectories+0xd1/0x110 [ 559.954937] vfs_rename+0x67e/0x1bc0 [ 559.958759] ? __d_alloc+0x9a0/0xa10 [ 559.962474] ? path_openat+0x2df0/0x2df0 [ 559.966522] ? do_raw_spin_unlock+0x171/0x230 [ 559.971004] ? _raw_spin_unlock+0x29/0x40 [ 559.975137] ? security_path_rename+0x1ed/0x2e0 [ 559.979872] do_renameat2+0xb59/0xc70 [ 559.983657] ? do_mknodat.part.0+0x480/0x480 [ 559.988064] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 559.992645] ? task_work_run+0x126/0x1c0 [ 559.996698] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 560.002048] ? trace_hardirqs_off_caller+0x6e/0x210 [ 560.007047] __x64_sys_rename+0x5d/0x80 [ 560.011005] do_syscall_64+0xf9/0x620 [ 560.014790] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 560.019961] RIP: 0033:0x7f852dc37e19 [ 560.023666] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 15 00 00 90 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 [ 560.042553] RSP: 002b:00007f852dbc21f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 [ 560.050242] RAX: ffffffffffffffda RBX: 00007f852dcbc798 RCX: 00007f852dc37e19 [ 560.057493] RDX: 00007f852dc37e19 RSI: 00000000200001c0 RDI: 0000000020000180 [ 560.064747] RBP: 00007f852dcbc790 R08: 0000000000000000 R09: 0000000000000000 [ 560.071997] R10: 00000000000005fb R11: 0000000000000246 R12: 00007f852dcbc79c [ 560.079249] R13: 00007ffebd99a3cf R14: 00007f852dbc2300 R15: 0000000000022000 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program