[ OK ] Started OpenBSD Secure Shell server. [ 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. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.73' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.365838] hfsplus: xattr searching failed [ 28.370477] [ 28.372086] ============================================ [ 28.377505] WARNING: possible recursive locking detected [ 28.382925] 4.14.302-syzkaller #0 Not tainted [ 28.387389] -------------------------------------------- [ 28.392809] syz-executor226/7976 is trying to acquire lock: [ 28.398487] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 28.408440] [ 28.408440] but task is already holding lock: [ 28.414399] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 28.424710] [ 28.424710] other info that might help us debug this: [ 28.431349] Possible unsafe locking scenario: [ 28.431349] [ 28.437549] CPU0 [ 28.440126] ---- [ 28.442676] lock(&HFSPLUS_I(inode)->extents_lock); [ 28.447751] lock(&HFSPLUS_I(inode)->extents_lock); [ 28.452823] [ 28.452823] *** DEADLOCK *** [ 28.452823] [ 28.458868] May be due to missing lock nesting notation [ 28.458868] [ 28.465763] 5 locks held by syz-executor226/7976: [ 28.470570] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 28.478959] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 28.488378] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 28.499098] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 28.508344] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 28.517499] [ 28.517499] stack backtrace: [ 28.521967] CPU: 0 PID: 7976 Comm: syz-executor226 Not tainted 4.14.302-syzkaller #0 [ 28.529843] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 28.539174] Call Trace: [ 28.541737] dump_stack+0x1b2/0x281 [ 28.545340] __lock_acquire.cold+0x180/0x97c [ 28.549725] ? register_lock_class+0x1d0/0x1180 [ 28.554371] ? trace_hardirqs_on+0x10/0x10 [ 28.558575] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 28.563909] ? save_trace+0xd6/0x290 [ 28.567596] ? __lock_acquire+0x2190/0x3f20 [ 28.571891] lock_acquire+0x170/0x3f0 [ 28.575664] ? hfsplus_get_block+0x1f9/0x820 [ 28.580044] ? hfsplus_get_block+0x1f9/0x820 [ 28.584422] __mutex_lock+0xc4/0x1310 [ 28.588194] ? hfsplus_get_block+0x1f9/0x820 [ 28.592572] ? hfsplus_get_block+0x1f9/0x820 [ 28.596956] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 28.602376] ? lock_acquire+0x170/0x3f0 [ 28.606319] ? create_page_buffers+0x14d/0x1c0 [ 28.610873] hfsplus_get_block+0x1f9/0x820 [ 28.615079] ? _raw_spin_unlock+0x29/0x40 [ 28.619195] ? create_page_buffers+0xce/0x1c0 [ 28.623662] block_read_full_page+0x25e/0x8d0 [ 28.628128] ? hfsplus_file_extend+0xef0/0xef0 [ 28.632689] ? __lru_cache_add+0x178/0x250 [ 28.636900] ? __bread_gfp+0x2e0/0x2e0 [ 28.640756] ? add_to_page_cache_lru+0x136/0x2b0 [ 28.645482] ? add_to_page_cache_locked+0x40/0x40 [ 28.650296] ? alloc_pages_current+0x15d/0x260 [ 28.654849] do_read_cache_page+0x38e/0xc10 [ 28.659146] ? hfsplus_bmap+0x30/0x30 [ 28.662920] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 28.668342] hfsplus_block_free+0x177/0x560 [ 28.672633] hfsplus_free_extents+0x170/0x440 [ 28.677099] hfsplus_file_truncate+0xbc0/0xe80 [ 28.681654] ? hfsplus_get_block+0x820/0x820 [ 28.686034] ? up_write+0x17/0x60 [ 28.689455] ? unmap_mapping_range+0xe9/0x250 [ 28.693925] ? inode_newsize_ok+0x145/0x1c0 [ 28.698215] hfsplus_setattr+0x182/0x310 [ 28.702250] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 28.706714] notify_change+0x56b/0xd10 [ 28.710576] do_truncate+0xff/0x1a0 [ 28.714174] ? finish_open+0x170/0x170 [ 28.718054] ? apparmor_path_truncate+0x163/0x1d0 [ 28.722870] path_openat+0x1dcc/0x2970 [ 28.726730] ? path_lookupat+0x780/0x780 [ 28.730763] ? trace_hardirqs_on+0x10/0x10 [ 28.734974] ? trace_hardirqs_on+0x10/0x10 [ 28.739180] do_filp_open+0x179/0x3c0 [ 28.742953] ? may_open_dev+0xe0/0xe0 [ 28.746723] ? lock_downgrade+0x740/0x740 [ 28.750842] ? do_raw_spin_unlock+0x164/0x220 [ 28.755307] ? _raw_spin_unlock+0x29/0x40 [ 28.759425] ? __alloc_fd+0x1be/0x490 [ 28.763218] ? _raw_spin_unlock_irq+0x24/0x80 [ 28.767682] do_sys_open+0x296/0x410 [ 28.771375] ? filp_open+0x60/0x60 [ 28.774887] ? do_syscall_64+0x4c/0x640 [ 28.778830] ? compat_SyS_openat+0x30/0x30 [ 28.783035] do_syscall_64+0x1d5/0x640 [ 28.786895] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 28.792054] RIP: 0033:0x7fbfa4963779 [ 28.795733] RSP: 002b:00007ffd1ba3dab8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 28.803414] RAX: ffffffffffffffda RBX: 0032656c69662f2e RCX: 00007fbfa4963779 [ 28.810659] RDX: 00007fbfa4921df3 RSI: 0000000000000000 RDI: 0000000020000080 [ 28.817900] RBP: 00007fbfa4923010 R08: 00000000000005cd R09: 0000000000000000 [ 28.825141] R10: 00007ffd1ba3d980 R11: 0000000000000246 R12: 00007fbfa49230a0 [ 28.832387] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000