[ OK ] Started Getty on tty2. [ OK ] Started Serial Getty on ttyS0. [ OK ] Started Getty on tty1. [ OK ] Reached target Login Prompts. [ OK ] Reached target Multi-User System. [ 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.10.54' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.093334] hfsplus: xattr searching failed [ 27.098074] [ 27.099696] ============================================ [ 27.105122] WARNING: possible recursive locking detected [ 27.110551] 4.14.302-syzkaller #0 Not tainted [ 27.115015] -------------------------------------------- [ 27.120505] syz-executor124/7979 is trying to acquire lock: [ 27.126274] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 27.136217] [ 27.136217] but task is already holding lock: [ 27.142166] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 27.152476] [ 27.152476] other info that might help us debug this: [ 27.159116] Possible unsafe locking scenario: [ 27.159116] [ 27.165153] CPU0 [ 27.167711] ---- [ 27.170370] lock(&HFSPLUS_I(inode)->extents_lock); [ 27.175566] lock(&HFSPLUS_I(inode)->extents_lock); [ 27.180651] [ 27.180651] *** DEADLOCK *** [ 27.180651] [ 27.186692] May be due to missing lock nesting notation [ 27.186692] [ 27.193596] 5 locks held by syz-executor124/7979: [ 27.198410] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 27.206864] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 27.216306] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 27.227042] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 27.236298] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 27.245463] [ 27.245463] stack backtrace: [ 27.249936] CPU: 1 PID: 7979 Comm: syz-executor124 Not tainted 4.14.302-syzkaller #0 [ 27.257904] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 27.267234] Call Trace: [ 27.269806] dump_stack+0x1b2/0x281 [ 27.273411] __lock_acquire.cold+0x180/0x97c [ 27.277796] ? register_lock_class+0x1d0/0x1180 [ 27.282443] ? trace_hardirqs_on+0x10/0x10 [ 27.286665] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 27.292005] ? save_trace+0xd6/0x290 [ 27.295695] ? __lock_acquire+0x2190/0x3f20 [ 27.300006] lock_acquire+0x170/0x3f0 [ 27.303798] ? hfsplus_get_block+0x1f9/0x820 [ 27.308195] ? hfsplus_get_block+0x1f9/0x820 [ 27.312586] __mutex_lock+0xc4/0x1310 [ 27.316365] ? hfsplus_get_block+0x1f9/0x820 [ 27.320745] ? hfsplus_get_block+0x1f9/0x820 [ 27.325139] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 27.330574] ? lock_acquire+0x170/0x3f0 [ 27.334532] ? create_page_buffers+0x14d/0x1c0 [ 27.339097] hfsplus_get_block+0x1f9/0x820 [ 27.343317] ? _raw_spin_unlock+0x29/0x40 [ 27.347440] ? create_page_buffers+0xce/0x1c0 [ 27.351905] block_read_full_page+0x25e/0x8d0 [ 27.356372] ? hfsplus_file_extend+0xef0/0xef0 [ 27.360928] ? __lru_cache_add+0x178/0x250 [ 27.365153] ? __bread_gfp+0x2e0/0x2e0 [ 27.369013] ? add_to_page_cache_lru+0x136/0x2b0 [ 27.373753] ? add_to_page_cache_locked+0x40/0x40 [ 27.378580] ? alloc_pages_current+0x15d/0x260 [ 27.383141] do_read_cache_page+0x38e/0xc10 [ 27.387489] ? hfsplus_bmap+0x30/0x30 [ 27.391266] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 27.396694] hfsplus_block_free+0x177/0x560 [ 27.400987] hfsplus_free_extents+0x170/0x440 [ 27.405455] hfsplus_file_truncate+0xbc0/0xe80 [ 27.410015] ? hfsplus_get_block+0x820/0x820 [ 27.414397] ? up_write+0x17/0x60 [ 27.417824] ? unmap_mapping_range+0xe9/0x250 [ 27.422293] ? inode_newsize_ok+0x145/0x1c0 [ 27.426592] hfsplus_setattr+0x182/0x310 [ 27.430625] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 27.435094] notify_change+0x56b/0xd10 [ 27.438953] do_truncate+0xff/0x1a0 [ 27.442552] ? finish_open+0x170/0x170 [ 27.446881] ? apparmor_path_truncate+0x163/0x1d0 [ 27.451696] path_openat+0x1dcc/0x2970 [ 27.455580] ? path_lookupat+0x780/0x780 [ 27.459619] ? trace_hardirqs_on+0x10/0x10 [ 27.463828] ? trace_hardirqs_on+0x10/0x10 [ 27.468037] do_filp_open+0x179/0x3c0 [ 27.471810] ? may_open_dev+0xe0/0xe0 [ 27.475582] ? lock_downgrade+0x740/0x740 [ 27.479699] ? do_raw_spin_unlock+0x164/0x220 [ 27.484166] ? _raw_spin_unlock+0x29/0x40 [ 27.488286] ? __alloc_fd+0x1be/0x490 [ 27.492056] ? _raw_spin_unlock_irq+0x24/0x80 [ 27.496523] do_sys_open+0x296/0x410 [ 27.500208] ? filp_open+0x60/0x60 [ 27.503719] ? do_syscall_64+0x4c/0x640 [ 27.507663] ? compat_SyS_openat+0x30/0x30 [ 27.511868] do_syscall_64+0x1d5/0x640 [ 27.515728] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 27.520886] RIP: 0033:0x7fd1ecefe789 [ 27.524566] RSP: 002b:00007ffdd85693e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 27.532245] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fd1ecefe789 [ 27.539486] RDX: 00007fd1ecebce03 RSI: 0000000000000000 RDI: 0000000020000300 [ 27.546728] RBP: 00007fd1ecebe020 R08: 00000000000005e1 R09: 0000000000000000 [ 27.553975] R10: 00007ffdd85692b0 R11: 0000000000000246 R12: 00007fd1ecebe0b0 [ 27.561217] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000