./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor2721741275 <...> Warning: Permanently added '10.128.1.82' (ED25519) to the list of known hosts. execve("./syz-executor2721741275", ["./syz-executor2721741275"], 0x7ffea38245a0 /* 10 vars */) = 0 brk(NULL) = 0x555591fbb000 brk(0x555591fbbd00) = 0x555591fbbd00 arch_prctl(ARCH_SET_FS, 0x555591fbb380) = 0 set_tid_address(0x555591fbb650) = 5091 set_robust_list(0x555591fbb660, 24) = 0 rseq(0x555591fbbca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor2721741275", 4096) = 28 getrandom("\x15\x91\x61\x42\x46\xe0\x7c\x7c", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x555591fbbd00 brk(0x555591fdcd00) = 0x555591fdcd00 brk(0x555591fdd000) = 0x555591fdd000 mprotect(0x7f13f0fb9000, 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) = 0x7f13e8a00000 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(0x7f13e8a00000, 138412032) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 close(4) = 0 mkdir("./file0", 0777) = 0 mount("/dev/loop0", "./file0", "hfsplus", MS_SYNCHRONOUS|MS_NOATIME|MS_POSIXACL, "") = 0 openat(AT_FDCWD, "./file0", O_RDONLY|O_DIRECTORY) = 3 chdir("./file0") = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = -1 EBUSY (Device or resource busy) openat(AT_FDCWD, "cgroup.controllers", O_RDWR|O_CREAT|O_NOCTTY|O_TRUNC|O_APPEND|FASYNC|0x18, 000) = 4 [ 57.415234][ T5091] loop0: detected capacity change from 0 to 1024 write(4, "\x30\x78\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\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"..., 65184) = 57344 [ 57.469772][ T5091] hfsplus: xattr searching failed [ 57.475924][ T5091] hfsplus: xattr searching failed [ 57.490016][ T5091] hfsplus: xattr searching failed [ 57.495327][ T5091] [ 57.497643][ T5091] ====================================================== [ 57.504663][ T5091] WARNING: possible circular locking dependency detected [ 57.511746][ T5091] 6.9.0-rc4-next-20240416-syzkaller #0 Not tainted [ 57.518223][ T5091] ------------------------------------------------------ [ 57.525221][ T5091] syz-executor272/5091 is trying to acquire lock: [ 57.531674][ T5091] ffff8880242d00b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x14a/0x1c0 [ 57.541348][ T5091] [ 57.541348][ T5091] but task is already holding lock: [ 57.548710][ T5091] ffff888023423048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2da/0xb50 [ 57.559847][ T5091] [ 57.559847][ T5091] which lock already depends on the new lock. [ 57.559847][ T5091] [ 57.570237][ T5091] [ 57.570237][ T5091] the existing dependency chain (in reverse order) is: [ 57.579316][ T5091] [ 57.579316][ T5091] -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: [ 57.588412][ T5091] lock_acquire+0x1ed/0x550 [ 57.593420][ T5091] __mutex_lock+0x136/0xd70 [ 57.598434][ T5091] hfsplus_file_extend+0x21b/0x1b70 [ 57.604134][ T5091] hfsplus_bmap_reserve+0x105/0x4e0 [ 57.609947][ T5091] __hfsplus_ext_write_extent+0x2a4/0x5c0 [ 57.616195][ T5091] __hfsplus_ext_cache_extent+0x84/0xe10 [ 57.622335][ T5091] hfsplus_file_extend+0x48c/0x1b70 [ 57.628042][ T5091] hfsplus_get_block+0x406/0x14f0 [ 57.633632][ T5091] __block_write_begin_int+0x50c/0x1a70 [ 57.645261][ T5091] block_write_begin+0x9b/0x1e0 [ 57.650704][ T5091] cont_write_begin+0x645/0x890 [ 57.656059][ T5091] hfsplus_write_begin+0x8a/0xd0 [ 57.661585][ T5091] generic_perform_write+0x322/0x640 [ 57.667459][ T5091] generic_file_write_iter+0xaf/0x310 [ 57.673332][ T5091] vfs_write+0xa72/0xc90 [ 57.678076][ T5091] ksys_write+0x1a0/0x2c0 [ 57.683015][ T5091] do_syscall_64+0xf5/0x240 [ 57.688016][ T5091] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 57.694415][ T5091] [ 57.694415][ T5091] -> #0 (&tree->tree_lock/1){+.+.}-{3:3}: [ 57.702312][ T5091] validate_chain+0x18cb/0x58e0 [ 57.707665][ T5091] __lock_acquire+0x1346/0x1fd0 [ 57.713101][ T5091] lock_acquire+0x1ed/0x550 [ 57.718111][ T5091] __mutex_lock+0x136/0xd70 [ 57.723115][ T5091] hfsplus_find_init+0x14a/0x1c0 [ 57.728553][ T5091] hfsplus_file_truncate+0x3fa/0xb50 [ 57.734355][ T5091] hfsplus_setattr+0x1ce/0x280 [ 57.739637][ T5091] notify_change+0xb9d/0xe70 [ 57.744731][ T5091] do_truncate+0x220/0x310 [ 57.749650][ T5091] path_openat+0x2a3d/0x3280 [ 57.754742][ T5091] do_filp_open+0x235/0x490 [ 57.759746][ T5091] do_sys_openat2+0x13e/0x1d0 [ 57.764944][ T5091] __x64_sys_creat+0x123/0x170 [ 57.770399][ T5091] do_syscall_64+0xf5/0x240 [ 57.775514][ T5091] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 57.781940][ T5091] [ 57.781940][ T5091] other info that might help us debug this: [ 57.781940][ T5091] [ 57.792151][ T5091] Possible unsafe locking scenario: [ 57.792151][ T5091] [ 57.799599][ T5091] CPU0 CPU1 [ 57.804948][ T5091] ---- ---- [ 57.810288][ T5091] lock(&HFSPLUS_I(inode)->extents_lock); [ 57.816084][ T5091] lock(&tree->tree_lock/1); [ 57.823263][ T5091] lock(&HFSPLUS_I(inode)->extents_lock); [ 57.831674][ T5091] lock(&tree->tree_lock/1); [ 57.836350][ T5091] [ 57.836350][ T5091] *** DEADLOCK *** [ 57.836350][ T5091] [ 57.844491][ T5091] 3 locks held by syz-executor272/5091: [ 57.850031][ T5091] #0: ffff888024482420 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 [ 57.859177][ T5091] #1: ffff888023423240 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: do_truncate+0x20c/0x310 [ 57.869611][ T5091] #2: ffff888023423048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2da/0xb50 [ 57.881202][ T5091] [ 57.881202][ T5091] stack backtrace: [ 57.887091][ T5091] CPU: 1 PID: 5091 Comm: syz-executor272 Not tainted 6.9.0-rc4-next-20240416-syzkaller #0 [ 57.896964][ T5091] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 [ 57.907003][ T5091] Call Trace: [ 57.910266][ T5091] [ 57.913182][ T5091] dump_stack_lvl+0x241/0x360 [ 57.917844][ T5091] ? __pfx_dump_stack_lvl+0x10/0x10 [ 57.923030][ T5091] ? print_circular_bug+0x130/0x1a0 [ 57.928229][ T5091] check_noncircular+0x36a/0x4a0 [ 57.933148][ T5091] ? __pfx_hlock_conflict+0x10/0x10 [ 57.938414][ T5091] ? __pfx_check_noncircular+0x10/0x10 [ 57.943962][ T5091] ? lockdep_lock+0x123/0x2b0 [ 57.948621][ T5091] ? _find_first_zero_bit+0xd4/0x100 [ 57.953895][ T5091] validate_chain+0x18cb/0x58e0 [ 57.958755][ T5091] ? __pfx_validate_chain+0x10/0x10 [ 57.963936][ T5091] ? mark_lock+0x9a/0x350 [ 57.968249][ T5091] ? lockdep_hardirqs_on_prepare+0x43d/0x780 [ 57.974209][ T5091] ? __pfx_lockdep_hardirqs_on_prepare+0x10/0x10 [ 57.980705][ T5091] ? mark_lock+0x9a/0x350 [ 57.985023][ T5091] ? lockdep_hardirqs_on+0x99/0x150 [ 57.990220][ T5091] __lock_acquire+0x1346/0x1fd0 [ 57.995058][ T5091] lock_acquire+0x1ed/0x550 [ 57.999558][ T5091] ? hfsplus_find_init+0x14a/0x1c0 [ 58.004655][ T5091] ? __pfx_lock_acquire+0x10/0x10 [ 58.009656][ T5091] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 58.015703][ T5091] ? __pfx___might_resched+0x10/0x10 [ 58.020972][ T5091] __mutex_lock+0x136/0xd70 [ 58.025455][ T5091] ? hfsplus_find_init+0x14a/0x1c0 [ 58.030551][ T5091] ? hfsplus_find_init+0x14a/0x1c0 [ 58.035646][ T5091] ? __pfx___mutex_lock+0x10/0x10 [ 58.040741][ T5091] ? hfsplus_find_init+0x85/0x1c0 [ 58.045752][ T5091] ? rcu_is_watching+0x15/0xb0 [ 58.050503][ T5091] ? hfsplus_find_init+0x85/0x1c0 [ 58.055524][ T5091] ? trace_kmalloc+0x1f/0xd0 [ 58.060138][ T5091] hfsplus_find_init+0x14a/0x1c0 [ 58.065057][ T5091] hfsplus_file_truncate+0x3fa/0xb50 [ 58.070330][ T5091] ? __up_read+0x2c2/0x6b0 [ 58.074736][ T5091] ? __pfx___up_read+0x10/0x10 [ 58.079508][ T5091] ? __pfx_hfsplus_file_truncate+0x10/0x10 [ 58.085409][ T5091] ? unmap_mapping_range+0xf8/0x290 [ 58.090607][ T5091] ? __pfx_unmap_mapping_range+0x10/0x10 [ 58.096242][ T5091] ? setattr_prepare+0x1f5/0xb20 [ 58.101166][ T5091] ? truncate_setsize+0xcf/0xf0 [ 58.105997][ T5091] hfsplus_setattr+0x1ce/0x280 [ 58.110747][ T5091] ? __pfx_hfsplus_setattr+0x10/0x10 [ 58.116101][ T5091] notify_change+0xb9d/0xe70 [ 58.120678][ T5091] do_truncate+0x220/0x310 [ 58.125078][ T5091] ? __pfx_do_truncate+0x10/0x10 [ 58.129998][ T5091] ? apparmor_file_truncate+0x297/0x350 [ 58.135531][ T5091] path_openat+0x2a3d/0x3280 [ 58.140112][ T5091] ? __pfx_path_openat+0x10/0x10 [ 58.145036][ T5091] do_filp_open+0x235/0x490 [ 58.149522][ T5091] ? __pfx_do_filp_open+0x10/0x10 [ 58.154622][ T5091] ? _raw_spin_unlock+0x28/0x50 [ 58.159538][ T5091] ? alloc_fd+0x59d/0x640 [ 58.163847][ T5091] do_sys_openat2+0x13e/0x1d0 [ 58.168597][ T5091] ? __pfx_do_sys_openat2+0x10/0x10 [ 58.173777][ T5091] ? _raw_spin_unlock_irq+0x2e/0x50 [ 58.178955][ T5091] ? ptrace_notify+0x279/0x380 [ 58.183979][ T5091] __x64_sys_creat+0x123/0x170 [ 58.188733][ T5091] ? __pfx___x64_sys_creat+0x10/0x10 [ 58.194024][ T5091] ? do_syscall_64+0x102/0x240 [ 58.198769][ T5091] do_syscall_64+0xf5/0x240 [ 58.203253][ T5091] ? clear_bhb_loop+0x35/0x90 [ 58.207916][ T5091] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 58.213885][ T5091] RIP: 0033:0x7f13f0f458f9 [ 58.218288][ T5091] 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 [ 58.237874][ T5091] RSP: 002b:00007ffd5e2a3808 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 58.246289][ T5091] RAX: ffffffffffffffda RBX: 00007ffd5e2a39d8 RCX: 00007f13f0f458f9 [ 58.254259][ T5091] RDX: 00007f13f0f458f9 RSI: 0000000000000180 RDI: 0000000020000000 [ 58.262211][ T5091] RBP: 00007f13f0fb9610 R08: 00007ffd5e2a39d8 R09: 00007ffd5e2a39d8 creat("./file1", 0600) = 5 exit_group(0) = ? +++ exited with 0 +++ [ 58.270163][ T5091] R10: 00007ffd5e