[ OK ] Started Getty on tty2. [ OK ] Found device /dev/ttyS0. [ OK ] Started Serial Getty on ttyS0. [ OK ] Reached target Login Prompts. [ OK ] Started OpenBSD Secure Shell server. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.180' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 42.493310] hfsplus: xattr searching failed [ 42.498563] hfsplus: xattr searching failed [ 42.504135] [ 42.505772] ============================================ [ 42.511310] WARNING: possible recursive locking detected [ 42.516767] 4.19.211-syzkaller #0 Not tainted [ 42.521374] -------------------------------------------- [ 42.526804] syz-executor194/8117 is trying to acquire lock: [ 42.532692] 00000000ad697f72 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_get_block+0x292/0x960 [ 42.542239] [ 42.542239] but task is already holding lock: [ 42.548193] 00000000d486bc46 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 42.558149] [ 42.558149] other info that might help us debug this: [ 42.564793] Possible unsafe locking scenario: [ 42.564793] [ 42.570826] CPU0 [ 42.573467] ---- [ 42.576022] lock(&HFSPLUS_I(inode)->extents_lock); [ 42.581105] lock(&HFSPLUS_I(inode)->extents_lock); [ 42.586290] [ 42.586290] *** DEADLOCK *** [ 42.586290] [ 42.592413] May be due to missing lock nesting notation [ 42.592413] [ 42.599325] 4 locks held by syz-executor194/8117: [ 42.604143] #0: 00000000259a24e4 (sb_writers#11){.+.+}, at: mnt_want_write+0x3a/0xb0 [ 42.612192] #1: 00000000c43bbf77 (&sb->s_type->i_mutex_key#17){+.+.}, at: do_truncate+0x125/0x1f0 [ 42.621277] #2: 00000000d486bc46 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 42.631924] #3: 000000003d15c8c8 (&sbi->alloc_mutex){+.+.}, at: hfsplus_block_free+0xdb/0x5d0 [ 42.640663] [ 42.640663] stack backtrace: [ 42.645141] CPU: 0 PID: 8117 Comm: syz-executor194 Not tainted 4.19.211-syzkaller #0 [ 42.653090] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 42.662428] Call Trace: [ 42.665021] dump_stack+0x1fc/0x2ef [ 42.668653] __lock_acquire.cold+0x121/0x57e [ 42.673045] ? mark_held_locks+0xf0/0xf0 [ 42.677170] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 42.682526] ? save_trace+0xd6/0x290 [ 42.686233] ? __lock_acquire+0x22f9/0x3ff0 [ 42.691069] lock_acquire+0x170/0x3c0 [ 42.694864] ? hfsplus_get_block+0x292/0x960 [ 42.699258] ? hfsplus_get_block+0x292/0x960 [ 42.703739] __mutex_lock+0xd7/0x1190 [ 42.707623] ? hfsplus_get_block+0x292/0x960 [ 42.712026] ? check_preemption_disabled+0x41/0x280 [ 42.717035] ? hfsplus_get_block+0x292/0x960 [ 42.721447] ? mutex_trylock+0x1a0/0x1a0 [ 42.725508] ? create_page_buffers+0x212/0x350 [ 42.730082] ? alloc_page_buffers+0x2da/0x5c0 [ 42.734565] ? lock_downgrade+0x720/0x720 [ 42.738690] ? do_raw_spin_lock+0xcb/0x220 [ 42.743009] hfsplus_get_block+0x292/0x960 [ 42.747241] block_read_full_page+0x288/0xd10 [ 42.751928] ? hfsplus_file_extend+0xf40/0xf40 [ 42.756518] ? __bread_gfp+0x300/0x300 [ 42.760408] ? add_to_page_cache_locked+0x40/0x40 [ 42.765253] do_read_cache_page+0x533/0x1170 [ 42.769654] ? hfsplus_bmap+0x30/0x30 [ 42.773445] hfsplus_block_free+0x18b/0x5d0 [ 42.777893] ? __mutex_unlock_slowpath+0xea/0x610 [ 42.782736] hfsplus_free_extents+0x228/0x520 [ 42.787313] hfsplus_file_truncate+0xd96/0x1040 [ 42.791973] ? hfsplus_get_block+0x960/0x960 [ 42.796370] ? up_write+0x18/0x150 [ 42.799916] ? unmap_mapping_pages+0x121/0x2b0 [ 42.804591] ? inode_newsize_ok+0x121/0x1e0 [ 42.809176] hfsplus_setattr+0x1e7/0x310 [ 42.813326] ? hfsplus_file_open+0x140/0x140 [ 42.817733] notify_change+0x70b/0xfc0 [ 42.821619] do_truncate+0x134/0x1f0 [ 42.825324] ? dentry_open+0x1d0/0x1d0 [ 42.829200] ? apparmor_path_truncate+0x183/0x200 [ 42.834029] ? inode_owner_or_capable+0x17a/0x1e0 [ 42.838913] path_openat+0x2308/0x2df0 [ 42.842837] ? path_lookupat+0x8d0/0x8d0 [ 42.846905] ? mark_held_locks+0xf0/0xf0 [ 42.850955] ? __lock_acquire+0x6de/0x3ff0 [ 42.855179] do_filp_open+0x18c/0x3f0 [ 42.858971] ? may_open_dev+0xf0/0xf0 [ 42.862774] ? lock_downgrade+0x720/0x720 [ 42.866933] ? lock_acquire+0x170/0x3c0 [ 42.870927] ? __alloc_fd+0x34/0x570 [ 42.874639] ? do_raw_spin_unlock+0x171/0x230 [ 42.879129] ? _raw_spin_unlock+0x29/0x40 [ 42.883262] ? __alloc_fd+0x28d/0x570 [ 42.887146] do_sys_open+0x3b3/0x520 [ 42.890931] ? filp_open+0x70/0x70 [ 42.894455] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 42.899860] ? trace_hardirqs_off_caller+0x6e/0x210 [ 42.904898] ? do_syscall_64+0x21/0x620 [ 42.908854] do_syscall_64+0xf9/0x620 [ 42.912636] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 42.917819] RIP: 0033:0x7f1589c16789 [ 42.921513] 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 [ 42.940396] RSP: 002b:00007fff6cd2a1a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 [ 42.948086] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f1589c16789 [ 42.955452] RDX: 0000000000000000 RSI: 0000000000143242 RDI: 0000000020000000 [ 42.962701] RBP: 00007f1589bd6020 R08: 00000000000005e1 R09: 0000000000000000 [ 42.969958] R10: 00007fff6cd2a070 R11: 0000000000000246 R12: 00007f1589bd60b0 [ 42.977207] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 42.991792] hfsplus: unable to mark block