./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor2267027838 <...> Warning: Permanently added '10.128.10.43' (ECDSA) to the list of known hosts. execve("./syz-executor2267027838", ["./syz-executor2267027838"], 0x7ffd57cbabf0 /* 10 vars */) = 0 brk(NULL) = 0x555556fc9000 brk(0x555556fc9c40) = 0x555556fc9c40 arch_prctl(ARCH_SET_FS, 0x555556fc9300) = 0 uname({sysname="Linux", nodename="syzkaller", ...}) = 0 readlink("/proc/self/exe", "/root/syz-executor2267027838", 4096) = 28 brk(0x555556feac40) = 0x555556feac40 brk(0x555556feb000) = 0x555556feb000 mprotect(0x7fca3e437000, 16384, PROT_READ) = 0 mmap(0x1ffff000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x1ffff000 mmap(0x20000000, 16777216, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x20000000 mmap(0x21000000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x21000000 memfd_create("syzkaller", 0) = 3 mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fca35f7e000 write(3, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 524288) = 524288 munmap(0x7fca35f7e000, 524288) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 mkdir("./file0", 0777) = 0 [ 70.859512][ T4994] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=4994 'syz-executor226' [ 70.879923][ T4994] loop0: detected capacity change from 0 to 1024 [ 70.889663][ T4994] ======================================================= [ 70.889663][ T4994] WARNING: The mand mount option has been deprecated and mount("/dev/loop0", "./file0", "hfsplus", MS_SYNCHRONOUS|MS_MANDLOCK|MS_NODIRATIME|MS_POSIXACL|MS_RELATIME|MS_STRICTATIME, "") = 0 openat(AT_FDCWD, "./file0", O_RDONLY|O_DIRECTORY) = 3 chdir("./file0") = 0 ioctl(4, LOOP_CLR_FD) = 0 close(4) = 0 openat(AT_FDCWD, "cgroup.controllers", O_RDWR|O_CREAT|O_NOCTTY|O_TRUNC|O_APPEND|FASYNC|0x18, 000) = -1 EIO (Input/output error) [ 70.889663][ T4994] and is ignored by this kernel. Remove the mand [ 70.889663][ T4994] option from the mount to silence this warning. [ 70.889663][ T4994] ======================================================= [ 70.943677][ T4994] hfsplus: xattr search failed [ 70.950103][ T4994] hfsplus: xattr searching failed [ 70.955908][ T4994] hfsplus: xattr searching failed [ 70.962333][ T4994] hfsplus: xattr searching failed [ 70.968443][ T4994] hfsplus: xattr searching failed [ 70.974895][ T4994] [ 70.977247][ T4994] ====================================================== [ 70.984259][ T4994] WARNING: possible circular locking dependency detected [ 70.991270][ T4994] 6.4.0-rc3-syzkaller-00015-g27e462c8fad4 #0 Not tainted [ 70.998278][ T4994] ------------------------------------------------------ [ 71.005287][ T4994] syz-executor226/4994 is trying to acquire lock: [ 71.011688][ T4994] ffff88807cdfe0b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x811/0xb40 [ 71.021535][ T4994] [ 71.021535][ T4994] but task is already holding lock: [ 71.028985][ T4994] ffff888079102988 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2da/0xb40 [ 71.040113][ T4994] [ 71.040113][ T4994] which lock already depends on the new lock. [ 71.040113][ T4994] [ 71.050509][ T4994] [ 71.050509][ T4994] the existing dependency chain (in reverse order) is: [ 71.059511][ T4994] [ 71.059511][ T4994] -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: [ 71.068547][ T4994] lock_acquire+0x1e3/0x520 [ 71.073582][ T4994] __mutex_lock_common+0x1d8/0x2530 [ 71.079322][ T4994] mutex_lock_nested+0x1b/0x20 [ 71.084609][ T4994] hfsplus_file_extend+0x1d6/0x1b10 [ 71.090333][ T4994] hfsplus_bmap_reserve+0x105/0x4e0 [ 71.096063][ T4994] hfsplus_create_cat+0x1ad/0x1bb0 [ 71.101701][ T4994] hfsplus_mknod+0x16a/0x2a0 [ 71.106806][ T4994] path_openat+0x13df/0x3170 [ 71.111912][ T4994] do_filp_open+0x234/0x490 [ 71.116929][ T4994] do_sys_openat2+0x13f/0x500 [ 71.122143][ T4994] __x64_sys_openat+0x247/0x290 [ 71.127512][ T4994] do_syscall_64+0x41/0xc0 [ 71.132506][ T4994] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 71.138915][ T4994] [ 71.138915][ T4994] -> #0 (&tree->tree_lock){+.+.}-{3:3}: [ 71.146644][ T4994] validate_chain+0x166b/0x58e0 [ 71.152019][ T4994] __lock_acquire+0x1295/0x2000 [ 71.157387][ T4994] lock_acquire+0x1e3/0x520 [ 71.162407][ T4994] __mutex_lock_common+0x1d8/0x2530 [ 71.168134][ T4994] mutex_lock_nested+0x1b/0x20 [ 71.173420][ T4994] hfsplus_file_truncate+0x811/0xb40 [ 71.179217][ T4994] hfsplus_setattr+0x1bd/0x280 [ 71.184505][ T4994] notify_change+0xc8b/0xf40 [ 71.189632][ T4994] do_truncate+0x220/0x300 [ 71.194578][ T4994] vfs_truncate+0x2e1/0x3a0 [ 71.199599][ T4994] do_sys_truncate+0xde/0x190 [ 71.204806][ T4994] do_syscall_64+0x41/0xc0 [ 71.209743][ T4994] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 71.216154][ T4994] [ 71.216154][ T4994] other info that might help us debug this: [ 71.216154][ T4994] [ 71.226372][ T4994] Possible unsafe locking scenario: [ 71.226372][ T4994] [ 71.233818][ T4994] CPU0 CPU1 [ 71.239199][ T4994] ---- ---- [ 71.244558][ T4994] lock(&HFSPLUS_I(inode)->extents_lock); [ 71.250367][ T4994] lock(&tree->tree_lock); [ 71.257394][ T4994] lock(&HFSPLUS_I(inode)->extents_lock); [ 71.265716][ T4994] lock(&tree->tree_lock); [ 71.270221][ T4994] [ 71.270221][ T4994] *** DEADLOCK *** [ 71.270221][ T4994] [ 71.278357][ T4994] 3 locks held by syz-executor226/4994: [ 71.283891][ T4994] #0: ffff88807d522460 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 [ 71.293050][ T4994] #1: ffff888079102b80 (&sb->s_type->i_mutex_key#14){+.+.}-{3:3}, at: do_truncate+0x20c/0x300 [ 71.303420][ T4994] #2: ffff888079102988 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2da/0xb40 [ 71.314989][ T4994] [ 71.314989][ T4994] stack backtrace: [ 71.320868][ T4994] CPU: 0 PID: 4994 Comm: syz-executor226 Not tainted 6.4.0-rc3-syzkaller-00015-g27e462c8fad4 #0 [ 71.331531][ T4994] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 [ 71.341588][ T4994] Call Trace: [ 71.344882][ T4994] [ 71.347809][ T4994] dump_stack_lvl+0x1e7/0x2d0 [ 71.352495][ T4994] ? nf_tcp_handle_invalid+0x650/0x650 [ 71.357980][ T4994] ? print_circular_bug+0x12b/0x1a0 [ 71.363185][ T4994] check_noncircular+0x2fe/0x3b0 [ 71.368125][ T4994] ? add_chain_block+0x850/0x850 [ 71.373080][ T4994] ? add_chain_block+0x850/0x850 [ 71.378025][ T4994] ? lockdep_lock+0x123/0x2b0 [ 71.382723][ T4994] ? add_chain_block+0x850/0x850 [ 71.387691][ T4994] ? _find_first_zero_bit+0xd4/0x100 [ 71.392989][ T4994] validate_chain+0x166b/0x58e0 [ 71.397866][ T4994] ? reacquire_held_locks+0x660/0x660 [ 71.403273][ T4994] ? reacquire_held_locks+0x660/0x660 [ 71.409187][ T4994] ? look_up_lock_class+0x77/0x140 [ 71.414319][ T4994] ? register_lock_class+0x104/0x990 [ 71.419609][ T4994] ? mark_lock+0x9a/0x340 [ 71.423946][ T4994] ? is_dynamic_key+0x1f0/0x1f0 [ 71.428817][ T4994] ? mark_lock+0x9a/0x340 [ 71.433154][ T4994] __lock_acquire+0x1295/0x2000 [ 71.438035][ T4994] lock_acquire+0x1e3/0x520 [ 71.442564][ T4994] ? hfsplus_file_truncate+0x811/0xb40 [ 71.448024][ T4994] ? read_lock_is_recursive+0x20/0x20 [ 71.453401][ T4994] ? __might_sleep+0xc0/0xc0 [ 71.458012][ T4994] __mutex_lock_common+0x1d8/0x2530 [ 71.463223][ T4994] ? hfsplus_file_truncate+0x811/0xb40 [ 71.468872][ T4994] ? hfsplus_file_truncate+0x811/0xb40 [ 71.474339][ T4994] ? mutex_lock_io_nested+0x60/0x60 [ 71.479565][ T4994] ? hfsplus_free_extents+0x47e/0xae0 [ 71.484949][ T4994] mutex_lock_nested+0x1b/0x20 [ 71.489715][ T4994] hfsplus_file_truncate+0x811/0xb40 [ 71.495003][ T4994] ? hfsplus_add_extent+0x880/0x880 [ 71.500199][ T4994] ? unmap_mapping_range+0xf8/0x290 [ 71.505397][ T4994] ? unmap_mapping_pages+0x180/0x180 [ 71.510677][ T4994] ? current_time+0x1e0/0x300 [ 71.515366][ T4994] ? truncate_setsize+0xcf/0xf0 [ 71.520216][ T4994] hfsplus_setattr+0x1bd/0x280 [ 71.524995][ T4994] ? hfsplus_fileattr_set+0x330/0x330 [ 71.530385][ T4994] notify_change+0xc8b/0xf40 [ 71.535017][ T4994] do_truncate+0x220/0x300 [ 71.539448][ T4994] ? put_page_bootmem+0x2e0/0x2e0 [ 71.544482][ T4994] ? bpf_lsm_path_truncate+0x9/0x10 [ 71.549679][ T4994] vfs_truncate+0x2e1/0x3a0 [ 71.554186][ T4994] do_sys_truncate+0xde/0x190 [ 71.558861][ T4994] ? break_lease+0xd0/0xd0 [ 71.563277][ T4994] ? syscall_enter_from_user_mode+0x32/0x230 [ 71.569258][ T4994] ? syscall_enter_from_user_mode+0x8c/0x230 [ 71.575239][ T4994] do_syscall_64+0x41/0xc0 [ 71.579659][ T4994] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 71.585552][ T4994] RIP: 0033:0x7fca3e3ca7b9 [ 71.589969][ T4994] 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 truncate("./file1", 0) = 0 exit_group(0) = ? +++ exited with 0 +++ [ 71.610090][ T4994] RSP: 002