./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor3268804809 <...> Warning: Permanently added '10.128.1.92' (ED25519) to the list of known hosts. execve("./syz-executor3268804809", ["./syz-executor3268804809"], 0x7ffdf557be00 /* 10 vars */) = 0 brk(NULL) = 0x555556b68000 brk(0x555556b68d00) = 0x555556b68d00 arch_prctl(ARCH_SET_FS, 0x555556b68380) = 0 set_tid_address(0x555556b68650) = 5066 set_robust_list(0x555556b68660, 24) = 0 rseq(0x555556b68ca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor3268804809", 4096) = 28 getrandom("\x5e\x77\x53\xaa\x72\xe8\x8c\x1f", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x555556b68d00 brk(0x555556b89d00) = 0x555556b89d00 brk(0x555556b8a000) = 0x555556b8a000 mprotect(0x7f65a960f000, 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) = 0x7f65a115f000 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(0x7f65a115f000, 138412032) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 mkdir("./file1", 0777) = 0 mount("/dev/loop0", "./file1", "hfsplus", MS_NODEV|MS_SYNCHRONOUS|MS_NODIRATIME|MS_POSIXACL|MS_STRICTATIME, "") = 0 openat(AT_FDCWD, "./file1", O_RDONLY|O_DIRECTORY) = 3 chdir("./file1") = 0 ioctl(4, LOOP_CLR_FD) = 0 close(4) = 0 [ 56.448623][ T5066] loop0: detected capacity change from 0 to 1024 [ 56.472471][ T5066] hfsplus: inconsistency in B*Tree (1792,1,255,1,0) [ 56.479571][ T5066] hfsplus: xattr searching failed openat(AT_FDCWD, "./file1", O_RDONLY|O_CREAT|O_NOCTTY|O_TRUNC|O_SYNC|O_LARGEFILE|O_NOATIME|FASYNC, 000) = 4 [ 56.488640][ T28] audit: type=1800 audit(1703092595.099:2): pid=5066 uid=0 auid=4294967295 ses=4294967295 subj=unconfined op=collect_data cause=failed comm="syz-executor326" name="file1" dev="loop0" ino=20 res=0 errno=0 [ 56.498616][ T5066] hfsplus: inconsistency in B*Tree (1792,1,255,1,0) [ 56.515108][ T5066] hfsplus: xattr searching failed [ 56.533804][ T5066] hfsplus: inconsistency in B*Tree (1792,1,255,1,0) [ 56.540530][ T5066] [ 56.542835][ T5066] ====================================================== [ 56.549825][ T5066] WARNING: possible circular locking dependency detected [ 56.556814][ T5066] 6.7.0-rc6-syzkaller-00022-g55cb5f43689d #0 Not tainted [ 56.563804][ T5066] ------------------------------------------------------ [ 56.570795][ T5066] syz-executor326/5066 is trying to acquire lock: [ 56.577175][ T5066] ffff8880783c0e88 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1c1/0x1090 [ 56.588203][ T5066] [ 56.588203][ T5066] but task is already holding lock: [ 56.595536][ T5066] ffff888018f0e0b0 (&tree->tree_lock/2){+.+.}-{3:3}, at: hfsplus_find_init+0x191/0x200 [ 56.605159][ T5066] [ 56.605159][ T5066] which lock already depends on the new lock. [ 56.605159][ T5066] [ 56.615535][ T5066] [ 56.615535][ T5066] the existing dependency chain (in reverse order) is: [ 56.624520][ T5066] [ 56.624520][ T5066] -> #2 (&tree->tree_lock/2){+.+.}-{3:3}: [ 56.632396][ T5066] __mutex_lock+0x175/0x9d0 [ 56.637401][ T5066] hfsplus_find_init+0x191/0x200 [ 56.642842][ T5066] hfsplus_attr_exists+0x103/0x200 [ 56.648455][ T5066] __hfsplus_setxattr+0x4c2/0x2200 [ 56.654063][ T5066] hfsplus_setxattr+0x10c/0x160 [ 56.659411][ T5066] __vfs_setxattr+0x173/0x1d0 [ 56.664591][ T5066] __vfs_setxattr_noperm+0x127/0x5e0 [ 56.670375][ T5066] __vfs_setxattr_locked+0x17e/0x250 [ 56.676160][ T5066] vfs_setxattr+0x146/0x350 [ 56.681164][ T5066] do_setxattr+0x142/0x170 [ 56.686078][ T5066] setxattr+0x159/0x170 [ 56.690733][ T5066] path_setxattr+0x175/0x1d0 [ 56.695824][ T5066] __x64_sys_lsetxattr+0xc1/0x160 [ 56.701349][ T5066] do_syscall_64+0x40/0x110 [ 56.706349][ T5066] entry_SYSCALL_64_after_hwframe+0x63/0x6b [ 56.712740][ T5066] [ 56.712740][ T5066] -> #1 (&tree->tree_lock){+.+.}-{3:3}: [ 56.720439][ T5066] __mutex_lock+0x175/0x9d0 [ 56.725438][ T5066] hfsplus_file_truncate+0x882/0x9d0 [ 56.731226][ T5066] hfsplus_setattr+0x1eb/0x310 [ 56.736491][ T5066] notify_change+0x742/0x11c0 [ 56.741670][ T5066] do_truncate+0x15c/0x220 [ 56.746586][ T5066] path_openat+0x2597/0x2c50 [ 56.751678][ T5066] do_filp_open+0x1de/0x430 [ 56.756681][ T5066] do_sys_openat2+0x176/0x1e0 [ 56.761859][ T5066] __x64_sys_openat+0x175/0x210 [ 56.767211][ T5066] do_syscall_64+0x40/0x110 [ 56.772215][ T5066] entry_SYSCALL_64_after_hwframe+0x63/0x6b [ 56.778604][ T5066] [ 56.778604][ T5066] -> #0 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: [ 56.787602][ T5066] __lock_acquire+0x2433/0x3b20 [ 56.792953][ T5066] lock_acquire+0x1ae/0x520 [ 56.797957][ T5066] __mutex_lock+0x175/0x9d0 [ 56.802959][ T5066] hfsplus_file_extend+0x1c1/0x1090 [ 56.808657][ T5066] hfsplus_bmap_reserve+0x318/0x410 [ 56.814355][ T5066] hfsplus_create_attr+0x22e/0x4a0 [ 56.819961][ T5066] __hfsplus_setxattr+0x515/0x2200 [ 56.825569][ T5066] hfsplus_setxattr+0x10c/0x160 [ 56.830917][ T5066] __vfs_setxattr+0x173/0x1d0 [ 56.836106][ T5066] __vfs_setxattr_noperm+0x127/0x5e0 [ 56.841900][ T5066] __vfs_setxattr_locked+0x17e/0x250 [ 56.847711][ T5066] vfs_setxattr+0x146/0x350 [ 56.852717][ T5066] do_setxattr+0x142/0x170 [ 56.857638][ T5066] setxattr+0x159/0x170 [ 56.862294][ T5066] path_setxattr+0x175/0x1d0 [ 56.867381][ T5066] __x64_sys_lsetxattr+0xc1/0x160 [ 56.872906][ T5066] do_syscall_64+0x40/0x110 [ 56.877913][ T5066] entry_SYSCALL_64_after_hwframe+0x63/0x6b [ 56.884309][ T5066] [ 56.884309][ T5066] other info that might help us debug this: [ 56.884309][ T5066] [ 56.894510][ T5066] Chain exists of: [ 56.894510][ T5066] &HFSPLUS_I(inode)->extents_lock --> &tree->tree_lock --> &tree->tree_lock/2 [ 56.894510][ T5066] [ 56.909250][ T5066] Possible unsafe locking scenario: [ 56.909250][ T5066] [ 56.916674][ T5066] CPU0 CPU1 [ 56.922012][ T5066] ---- ---- [ 56.927349][ T5066] lock(&tree->tree_lock/2); [ 56.932004][ T5066] lock(&tree->tree_lock); [ 56.938998][ T5066] lock(&tree->tree_lock/2); [ 56.946170][ T5066] lock(&HFSPLUS_I(inode)->extents_lock); [ 56.951951][ T5066] [ 56.951951][ T5066] *** DEADLOCK *** [ 56.951951][ T5066] [ 56.960071][ T5066] 4 locks held by syz-executor326/5066: [ 56.965589][ T5066] #0: ffff888018fa8418 (sb_writers#9){.+.+}-{0:0}, at: path_setxattr+0xc3/0x1d0 [ 56.974701][ T5066] #1: ffff888017bf8300 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: vfs_setxattr+0x123/0x350 [ 56.985112][ T5066] #2: ffff888017fb00b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x1a3/0x200 [ 56.994994][ T5066] #3: ffff888018f0e0b0 (&tree->tree_lock/2){+.+.}-{3:3}, at: hfsplus_find_init+0x191/0x200 [ 57.005052][ T5066] [ 57.005052][ T5066] stack backtrace: [ 57.010915][ T5066] CPU: 0 PID: 5066 Comm: syz-executor326 Not tainted 6.7.0-rc6-syzkaller-00022-g55cb5f43689d #0 [ 57.021300][ T5066] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 [ 57.031331][ T5066] Call Trace: [ 57.034590][ T5066] [ 57.037499][ T5066] dump_stack_lvl+0xd9/0x1b0 [ 57.042070][ T5066] check_noncircular+0x317/0x400 [ 57.046992][ T5066] ? print_circular_bug+0x5c0/0x5c0 [ 57.052171][ T5066] ? register_lock_class+0xb1/0x1220 [ 57.057439][ T5066] ? lockdep_hardirqs_on_prepare+0x420/0x420 [ 57.063401][ T5066] ? lockdep_lock+0xc6/0x200 [ 57.067969][ T5066] ? hlock_class+0x130/0x130 [ 57.072537][ T5066] __lock_acquire+0x2433/0x3b20 [ 57.077371][ T5066] ? lockdep_hardirqs_on_prepare+0x420/0x420 [ 57.083331][ T5066] ? lock_acquire+0x1ae/0x520 [ 57.087990][ T5066] lock_acquire+0x1ae/0x520 [ 57.092485][ T5066] ? hfsplus_file_extend+0x1c1/0x1090 [ 57.097840][ T5066] ? lock_sync+0x190/0x190 [ 57.102240][ T5066] ? preempt_count_sub+0x160/0x160 [ 57.107327][ T5066] __mutex_lock+0x175/0x9d0 [ 57.111810][ T5066] ? hfsplus_file_extend+0x1c1/0x1090 [ 57.117165][ T5066] ? hfsplus_find_init+0x95/0x200 [ 57.122173][ T5066] ? hfsplus_file_extend+0x1c1/0x1090 [ 57.127526][ T5066] ? mutex_trylock+0x130/0x130 [ 57.132265][ T5066] ? __mutex_trylock_common+0xeb/0x250 [ 57.137702][ T5066] ? mutex_is_locked+0x40/0x40 [ 57.142441][ T5066] ? hfsplus_file_extend+0x1c1/0x1090 [ 57.147790][ T5066] hfsplus_file_extend+0x1c1/0x1090 [ 57.152970][ T5066] ? trace_contention_end+0xd6/0x100 [ 57.158234][ T5066] ? hfsplus_free_fork+0x820/0x820 [ 57.163324][ T5066] ? hfsplus_find_init+0x191/0x200 [ 57.168411][ T5066] ? mutex_trylock+0x130/0x130 [ 57.173152][ T5066] hfsplus_bmap_reserve+0x318/0x410 [ 57.178333][ T5066] hfsplus_create_attr+0x22e/0x4a0 [ 57.183421][ T5066] ? hfsplus_attr_exists+0x200/0x200 [ 57.188685][ T5066] __hfsplus_setxattr+0x515/0x2200 [ 57.193772][ T5066] ? bpf_ksym_find+0x124/0x1b0 [ 57.198516][ T5066] ? lock_acquire+0x1ae/0x520 [ 57.203180][ T5066] ? find_held_lock+0x2d/0x110 [ 57.207923][ T5066] ? copy_name+0xa0/0xa0 [ 57.212147][ T5066] ? mark_held_locks+0x9f/0xe0 [ 57.216898][ T5066] ? _raw_spin_unlock_irqrestore+0x4e/0x70 [ 57.222681][ T5066] ? lockdep_hardirqs_on+0x7d/0x110 [ 57.227873][ T5066] hfsplus_setxattr+0x10c/0x160 [ 57.232706][ T5066] ? hfsplus_init_security+0x40/0x40 [ 57.237972][ T5066] __vfs_setxattr+0x173/0x1d0 [ 57.242637][ T5066] ? __vfs_removexattr+0x1c0/0x1c0 [ 57.247741][ T5066] ? apparmor_capable+0x126/0x1e0 [ 57.252749][ T5066] __vfs_setxattr_noperm+0x127/0x5e0 [ 57.258021][ T5066] __vfs_setxattr_locked+0x17e/0x250 [ 57.263303][ T5066] vfs_setxattr+0x146/0x350 [ 57.267783][ T5066] ? entry_SYSCALL_64_after_hwframe+0x63/0x6b [ 57.273828][ T5066] ? __vfs_setxattr_locked+0x250/0x250 [ 57.279269][ T5066] do_setxattr+0x142/0x170 [ 57.283664][ T5066] setxattr+0x159/0x170 [ 57.287799][ T5066] ? do_setxattr+0x170/0x170 [ 57.292373][ T5066] ? mnt_get_write_access+0x20c/0x300 [ 57.297723][ T5066] path_setxattr+0x175/0x1d0 [ 57.302293][ T5066] ? setxattr+0x170/0x170 [ 57.306608][ T5066] ? _raw_spin_unlock_irq+0x23/0x50 [ 57.311867][ T5066] ? _raw_spin_unlock_irq+0x2e/0x50 [ 57.317038][ T5066] ? ptrace_notify+0xf4/0x130 [ 57.321697][ T5066] __x64_sys_lsetxattr+0xc1/0x160 [ 57.326702][ T5066] ? syscall_enter_from_user_mode+0x107/0x120 [ 57.332745][ T5066] do_syscall_64+0x40/0x110 [ 57.337228][ T5066] entry_SYSCALL_64_after_hwframe+0x63/0x6b [ 57.343097][ T5066] RIP: 0033:0x7f65a959c5f9 [ 57.347488][ T5066] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 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 [ 57.367076][ T5066] RSP: 002b:00007fff4db86718 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd [ 57.375463][ T5066] RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007f65a959c5f9 [ 57.383412][ T5066] RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000020000040 [ 57.391362][ T5066] RBP: 00007f65a960f610 R08: 0000000000000000 R09: 0000000000000000 lsetxattr("./file1", "trusted.overlay.opaque", NULL, 0, 0) = -1 EIO (Input/output error) exit_group(0) = ? +++ exited with 0 +++ [ 57.399310][ T5066] R10: 00000000000000