[ 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. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.179' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.936220] hfsplus: xattr searching failed [ 32.941111] [ 32.942739] ============================================ [ 32.948164] WARNING: possible recursive locking detected [ 32.953595] 4.19.211-syzkaller #0 Not tainted [ 32.958073] -------------------------------------------- [ 32.963497] syz-executor293/8072 is trying to acquire lock: [ 32.969209] 000000002345367d (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_get_block+0x292/0x960 [ 32.978737] [ 32.978737] but task is already holding lock: [ 32.984684] 000000005ad27fe3 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 32.994651] [ 32.994651] other info that might help us debug this: [ 33.001293] Possible unsafe locking scenario: [ 33.001293] [ 33.007326] CPU0 [ 33.009882] ---- [ 33.012439] lock(&HFSPLUS_I(inode)->extents_lock); [ 33.017516] lock(&HFSPLUS_I(inode)->extents_lock); [ 33.022593] [ 33.022593] *** DEADLOCK *** [ 33.022593] [ 33.028626] May be due to missing lock nesting notation [ 33.028626] [ 33.035529] 4 locks held by syz-executor293/8072: [ 33.040344] #0: 00000000bca0d5fc (sb_writers#11){.+.+}, at: mnt_want_write+0x3a/0xb0 [ 33.048300] #1: 0000000078f46c11 (&sb->s_type->i_mutex_key#17){+.+.}, at: do_truncate+0x125/0x1f0 [ 33.057382] #2: 000000005ad27fe3 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 33.067765] #3: 00000000c81062c5 (&sbi->alloc_mutex){+.+.}, at: hfsplus_block_free+0xdb/0x5d0 [ 33.076498] [ 33.076498] stack backtrace: [ 33.080975] CPU: 0 PID: 8072 Comm: syz-executor293 Not tainted 4.19.211-syzkaller #0 [ 33.088830] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 33.098158] Call Trace: [ 33.100731] dump_stack+0x1fc/0x2ef [ 33.104340] __lock_acquire.cold+0x121/0x57e [ 33.108734] ? mark_held_locks+0xf0/0xf0 [ 33.112842] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 33.118193] ? save_trace+0xd6/0x290 [ 33.121900] ? __lock_acquire+0x22f9/0x3ff0 [ 33.126218] lock_acquire+0x170/0x3c0 [ 33.130034] ? hfsplus_get_block+0x292/0x960 [ 33.134430] ? hfsplus_get_block+0x292/0x960 [ 33.138822] __mutex_lock+0xd7/0x1190 [ 33.142622] ? hfsplus_get_block+0x292/0x960 [ 33.147018] ? check_preemption_disabled+0x41/0x280 [ 33.152015] ? hfsplus_get_block+0x292/0x960 [ 33.156403] ? mutex_trylock+0x1a0/0x1a0 [ 33.160445] ? create_page_buffers+0x212/0x350 [ 33.165006] ? alloc_page_buffers+0x2da/0x5c0 [ 33.169479] ? lock_downgrade+0x720/0x720 [ 33.173600] ? do_raw_spin_lock+0xcb/0x220 [ 33.177814] hfsplus_get_block+0x292/0x960 [ 33.182038] block_read_full_page+0x288/0xd10 [ 33.186513] ? hfsplus_file_extend+0xf40/0xf40 [ 33.191078] ? __bread_gfp+0x300/0x300 [ 33.194947] ? add_to_page_cache_locked+0x40/0x40 [ 33.199770] do_read_cache_page+0x533/0x1170 [ 33.204156] ? hfsplus_bmap+0x30/0x30 [ 33.207937] hfsplus_block_free+0x18b/0x5d0 [ 33.212236] ? __mutex_unlock_slowpath+0xea/0x610 [ 33.217058] hfsplus_free_extents+0x228/0x520 [ 33.221533] hfsplus_file_truncate+0xd96/0x1040 [ 33.226184] ? hfsplus_get_block+0x960/0x960 [ 33.230571] ? up_write+0x18/0x150 [ 33.234093] ? unmap_mapping_pages+0x121/0x2b0 [ 33.238652] ? inode_newsize_ok+0x121/0x1e0 [ 33.242953] hfsplus_setattr+0x1e7/0x310 [ 33.246996] ? hfsplus_file_open+0x140/0x140 [ 33.251380] notify_change+0x70b/0xfc0 [ 33.255243] do_truncate+0x134/0x1f0 [ 33.258937] ? dentry_open+0x1d0/0x1d0 [ 33.262803] ? apparmor_path_truncate+0x183/0x200 [ 33.267626] ? inode_permission+0x3d/0x140 [ 33.271839] path_openat+0x2308/0x2df0 [ 33.275708] ? path_lookupat+0x8d0/0x8d0 [ 33.279747] ? mark_held_locks+0xf0/0xf0 [ 33.283783] ? __lock_acquire+0x6de/0x3ff0 [ 33.287997] do_filp_open+0x18c/0x3f0 [ 33.291775] ? may_open_dev+0xf0/0xf0 [ 33.295555] ? lock_downgrade+0x720/0x720 [ 33.299679] ? lock_acquire+0x170/0x3c0 [ 33.303631] ? __alloc_fd+0x34/0x570 [ 33.307323] ? do_raw_spin_unlock+0x171/0x230 [ 33.311795] ? _raw_spin_unlock+0x29/0x40 [ 33.315920] ? __alloc_fd+0x28d/0x570 [ 33.319704] do_sys_open+0x3b3/0x520 [ 33.323394] ? filp_open+0x70/0x70 [ 33.326913] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 33.332257] ? trace_hardirqs_off_caller+0x6e/0x210 [ 33.337249] ? do_syscall_64+0x21/0x620 [ 33.341209] do_syscall_64+0xf9/0x620 [ 33.344989] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.350161] RIP: 0033:0x7faa0cf3e789 [ 33.353854] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 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 c0 ff ff ff f7 d8 64 89 01 48 [ 33.372732] RSP: 002b:00007ffc19f1d098 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 33.380416] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007faa0cf3e789 [ 33.387674] RDX: 00007faa0cefce03 RSI: 0000000000000000 RDI: 00000000200000c0 [ 33.394920] RBP: 00007faa0cefe020 R08: 00000000000005e1 R09: 0000000000000000 [ 33.402188] R10: 00007ffc19f1cf60 R11: 0000000000000246 R12: 00007faa0cefe0b0 [ 33.409435] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 33.429552] hfsplus: unable to mark blocks free: error -5 [ 33.435161] hfsplus: can't fre