[ OK ] Started Getty on tty2. [ OK ] Started Getty on tty1. [ OK ] Started Serial Getty on ttyS0. [ 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.0.185' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.115433] hfsplus: xattr searching failed [ 27.120107] [ 27.121720] ============================================ [ 27.127146] WARNING: possible recursive locking detected [ 27.132566] 4.14.302-syzkaller #0 Not tainted [ 27.137031] -------------------------------------------- [ 27.142447] syz-executor161/7975 is trying to acquire lock: [ 27.148123] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 27.158077] [ 27.158077] but task is already holding lock: [ 27.164016] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 27.174302] [ 27.174302] other info that might help us debug this: [ 27.180940] Possible unsafe locking scenario: [ 27.180940] [ 27.186963] CPU0 [ 27.189512] ---- [ 27.192064] lock(&HFSPLUS_I(inode)->extents_lock); [ 27.197138] lock(&HFSPLUS_I(inode)->extents_lock); [ 27.202209] [ 27.202209] *** DEADLOCK *** [ 27.202209] [ 27.208235] May be due to missing lock nesting notation [ 27.208235] [ 27.215144] 5 locks held by syz-executor161/7975: [ 27.219953] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 27.228331] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 27.237765] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 27.248483] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 27.257729] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 27.266973] [ 27.266973] stack backtrace: [ 27.271441] CPU: 1 PID: 7975 Comm: syz-executor161 Not tainted 4.14.302-syzkaller #0 [ 27.279290] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 27.288613] Call Trace: [ 27.291174] dump_stack+0x1b2/0x281 [ 27.294773] __lock_acquire.cold+0x180/0x97c [ 27.299158] ? register_lock_class+0x1d0/0x1180 [ 27.303796] ? trace_hardirqs_on+0x10/0x10 [ 27.308000] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 27.313338] ? save_trace+0xd6/0x290 [ 27.317025] ? __lock_acquire+0x2190/0x3f20 [ 27.321319] lock_acquire+0x170/0x3f0 [ 27.325144] ? hfsplus_get_block+0x1f9/0x820 [ 27.329527] ? hfsplus_get_block+0x1f9/0x820 [ 27.333912] __mutex_lock+0xc4/0x1310 [ 27.337683] ? hfsplus_get_block+0x1f9/0x820 [ 27.342063] ? hfsplus_get_block+0x1f9/0x820 [ 27.346500] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 27.351921] ? lock_acquire+0x170/0x3f0 [ 27.355873] ? create_page_buffers+0x14d/0x1c0 [ 27.360427] hfsplus_get_block+0x1f9/0x820 [ 27.364633] ? _raw_spin_unlock+0x29/0x40 [ 27.368750] ? create_page_buffers+0xce/0x1c0 [ 27.373217] block_read_full_page+0x25e/0x8d0 [ 27.377689] ? hfsplus_file_extend+0xef0/0xef0 [ 27.382244] ? __lru_cache_add+0x178/0x250 [ 27.386473] ? __bread_gfp+0x2e0/0x2e0 [ 27.390332] ? add_to_page_cache_lru+0x136/0x2b0 [ 27.395060] ? add_to_page_cache_locked+0x40/0x40 [ 27.399872] ? alloc_pages_current+0x15d/0x260 [ 27.404426] do_read_cache_page+0x38e/0xc10 [ 27.408723] ? hfsplus_bmap+0x30/0x30 [ 27.412494] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 27.418088] hfsplus_block_free+0x177/0x560 [ 27.422380] hfsplus_free_extents+0x170/0x440 [ 27.426846] hfsplus_file_truncate+0xbc0/0xe80 [ 27.431400] ? hfsplus_get_block+0x820/0x820 [ 27.435778] ? up_write+0x17/0x60 [ 27.439201] ? unmap_mapping_range+0xe9/0x250 [ 27.443667] ? inode_newsize_ok+0x145/0x1c0 [ 27.447959] hfsplus_setattr+0x182/0x310 [ 27.451991] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 27.456455] notify_change+0x56b/0xd10 [ 27.460314] do_truncate+0xff/0x1a0 [ 27.463909] ? finish_open+0x170/0x170 [ 27.467770] ? apparmor_path_truncate+0x163/0x1d0 [ 27.472584] path_openat+0x1dcc/0x2970 [ 27.476477] ? path_lookupat+0x780/0x780 [ 27.480508] ? trace_hardirqs_on+0x10/0x10 [ 27.484723] ? trace_hardirqs_on+0x10/0x10 [ 27.488927] do_filp_open+0x179/0x3c0 [ 27.492705] ? may_open_dev+0xe0/0xe0 [ 27.496478] ? lock_downgrade+0x740/0x740 [ 27.500599] ? do_raw_spin_unlock+0x164/0x220 [ 27.505072] ? _raw_spin_unlock+0x29/0x40 [ 27.509227] ? __alloc_fd+0x1be/0x490 [ 27.513001] ? _raw_spin_unlock_irq+0x24/0x80 [ 27.517468] do_sys_open+0x296/0x410 [ 27.521154] ? filp_open+0x60/0x60 [ 27.524664] ? do_syscall_64+0x4c/0x640 [ 27.528607] ? compat_SyS_openat+0x30/0x30 [ 27.532809] do_syscall_64+0x1d5/0x640 [ 27.536666] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 27.541830] RIP: 0033:0x7fe8330f9779 [ 27.545603] RSP: 002b:00007ffdd06b38a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 27.553277] RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007fe8330f9779 [ 27.560517] RDX: 00007fe8330b7df3 RSI: 00000000000000f6 RDI: 00000000200002c0 [ 27.567757] RBP: 00007fe8330b9010 R08: 00000000000005cd R09: 0000000000000000 [ 27.575001] R10: 00007ffdd06b3770 R11: 0000000000000246 R12: 00007fe8330b90a0 [ 27.582239] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000