hfsplus: catalog name length corrupted hfsplus: failed to load root directory ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.1/12569 is trying to acquire lock: 00000000f32e776c (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_extend+0x1bb/0xf40 fs/hfsplus/extents.c:457 but task is already holding lock: 000000008f71ba06 (&tree->tree_lock){+.+.}, at: hfsplus_find_init+0x1b7/0x220 fs/hfsplus/bfind.c:30 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&tree->tree_lock){+.+.}: hfsplus_file_truncate+0xde7/0x1040 fs/hfsplus/extents.c:595 hfsplus_file_release+0xeb/0x210 fs/hfsplus/inode.c:233 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&HFSPLUS_I(inode)->extents_lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:937 [inline] __mutex_lock+0xd7/0x1190 kernel/locking/mutex.c:1078 hfsplus_file_extend+0x1bb/0xf40 fs/hfsplus/extents.c:457 hfsplus_bmap_reserve+0x298/0x440 fs/hfsplus/btree.c:357 hfsplus_create_cat+0x1e3/0x1210 fs/hfsplus/catalog.c:272 hfsplus_mknod+0x165/0x320 fs/hfsplus/dir.c:494 lookup_open+0x893/0x1a20 fs/namei.c:3235 do_last fs/namei.c:3327 [inline] path_openat+0x1094/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&tree->tree_lock); lock(&HFSPLUS_I(inode)->extents_lock); lock(&tree->tree_lock); lock(&HFSPLUS_I(inode)->extents_lock); *** DEADLOCK *** 4 locks held by syz-executor.1/12569: #0: 00000000bb845474 (sb_writers#23){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 00000000bb845474 (sb_writers#23){.+.+}, at: mnt_want_write+0x3a/0xb0 fs/namespace.c:360 #1: 00000000755a5da7 (&type->i_mutex_dir_key#15){++++}, at: inode_lock include/linux/fs.h:748 [inline] #1: 00000000755a5da7 (&type->i_mutex_dir_key#15){++++}, at: do_last fs/namei.c:3324 [inline] #1: 00000000755a5da7 (&type->i_mutex_dir_key#15){++++}, at: path_openat+0x1071/0x2df0 fs/namei.c:3537 #2: 00000000f70623a2 (&sbi->vh_mutex){+.+.}, at: hfsplus_mknod+0x82/0x320 fs/hfsplus/dir.c:486 #3: 000000008f71ba06 (&tree->tree_lock){+.+.}, at: hfsplus_find_init+0x1b7/0x220 fs/hfsplus/bfind.c:30 stack backtrace: CPU: 0 PID: 12569 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2420 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 __mutex_lock_common kernel/locking/mutex.c:937 [inline] __mutex_lock+0xd7/0x1190 kernel/locking/mutex.c:1078 hfsplus_file_extend+0x1bb/0xf40 fs/hfsplus/extents.c:457 hfsplus_bmap_reserve+0x298/0x440 fs/hfsplus/btree.c:357 hfsplus_create_cat+0x1e3/0x1210 fs/hfsplus/catalog.c:272 hfsplus_mknod+0x165/0x320 fs/hfsplus/dir.c:494 lookup_open+0x893/0x1a20 fs/namei.c:3235 do_last fs/namei.c:3327 [inline] path_openat+0x1094/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fdaf35a20f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdaf1b14168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007fdaf36c1f80 RCX: 00007fdaf35a20f9 RDX: 0000000000000000 RSI: 0000000000147042 RDI: 0000000020000040 RBP: 00007fdaf35fdae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc3ffb93ef R14: 00007fdaf1b14300 R15: 0000000000022000 hfsplus: catalog name length corrupted kauditd_printk_skb: 10 callbacks suppressed audit: type=1800 audit(1677844262.271:1194): pid=12616 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 hfsplus: failed to load root directory audit: type=1800 audit(1677844262.431:1195): pid=12634 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 audit: type=1800 audit(1677844262.431:1196): pid=12650 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 audit: type=1800 audit(1677844262.561:1197): pid=12666 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 hfsplus: catalog name length corrupted hfsplus: failed to load root directory audit: type=1800 audit(1677844262.711:1198): pid=12690 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 hfsplus: catalog name length corrupted audit: type=1800 audit(1677844262.851:1199): pid=12732 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="sda1" ino=14769 res=0 hfsplus: failed to load root directory hfsplus: catalog name length corrupted hfsplus: failed to load root directory audit: type=1800 audit(1677844263.201:1200): pid=12781 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 hfsplus: catalog name length corrupted hfsplus: failed to load root directory audit: type=1800 audit(1677844263.401:1201): pid=12809 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: catalog name length corrupted audit: type=1800 audit(1677844263.661:1202): pid=12868 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 hfsplus: failed to load root directory audit: type=1800 audit(1677844263.661:1203): pid=12892 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: catalog name length corrupted hfsplus: failed to load root directory ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy1 wpan1: encryption failed: -22 hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: unable to parse mount options hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: unable to parse mount options hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: unable to parse mount options hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: catalog name length corrupted hfsplus: failed to load root directory kauditd_printk_skb: 17 callbacks suppressed audit: type=1800 audit(1677844267.752:1221): pid=13548 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="sda1" ino=15249 res=0 hfsplus: catalog name length corrupted audit: type=1800 audit(1677844267.872:1222): pid=13581 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="sda1" ino=15141 res=0 hfsplus: failed to load root directory hfsplus: catalog name length corrupted audit: type=1800 audit(1677844268.122:1223): pid=13623 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="sda1" ino=15873 res=0 hfsplus: failed to load root directory audit: type=1800 audit(1677844268.452:1224): pid=13670 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 hfsplus: catalog name length corrupted hfsplus: failed to load root directory audit: type=1800 audit(1677844268.692:1225): pid=13695 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 netlink: 4 bytes leftover after parsing attributes in process `syz-executor.3'. hfsplus: catalog name length corrupted hfsplus: failed to load root directory audit: type=1800 audit(1677844268.912:1226): pid=13733 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="sda1" ino=15633 res=0 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.3'. hfsplus: catalog name length corrupted audit: type=1800 audit(1677844269.172:1227): pid=13764 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 hfsplus: failed to load root directory netlink: 4 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 40 bytes leftover after parsing attributes in process `syz-executor.1'. audit: type=1800 audit(1677844269.412:1228): pid=13809 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="sda1" ino=14827 res=0 netlink: 4 bytes leftover after parsing attributes in process `syz-executor.3'. hfsplus: unable to parse mount options hfsplus: unable to parse mount options netlink: 40 bytes leftover after parsing attributes in process `syz-executor.1'. audit: type=1800 audit(1677844269.772:1229): pid=13847 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 hfsplus: unable to parse mount options hfsplus: catalog name length corrupted hfsplus: failed to load root directory audit: type=1800 audit(1677844270.002:1230): pid=13884 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.1" name="bus" dev="loop1" ino=25 res=0 hfsplus: unable to parse mount options hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: unable to parse mount options hfsplus: catalog name length corrupted hfsplus: unable to parse mount options hfsplus: failed to load root directory hfsplus: catalog name length corrupted hfsplus: failed to load root directory hfsplus: catalog name length corrupted hfsplus: failed to load root directory EXT4-fs (loop3): Unrecognized mount option "0xffffffffffffffff˙˙˙˙18446744073709551615" or missing value hfsplus: catalog name length corrupted