./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor3001070520 <...> Warning: Permanently added '10.128.0.102' (ECDSA) to the list of known hosts. execve("./syz-executor3001070520", ["./syz-executor3001070520"], 0x7ffd1efe4390 /* 10 vars */) = 0 brk(NULL) = 0x55555747f000 brk(0x55555747fc40) = 0x55555747fc40 arch_prctl(ARCH_SET_FS, 0x55555747f300) = 0 uname({sysname="Linux", nodename="syzkaller", ...}) = 0 readlink("/proc/self/exe", "/root/syz-executor3001070520", 4096) = 28 brk(0x5555574a0c40) = 0x5555574a0c40 brk(0x5555574a1000) = 0x5555574a1000 mprotect(0x7fe1177b0000, 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) = 0x7fe10f2f7000 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(0x7fe10f2f7000, 524288) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 mkdir("./bus", 0777) = 0 [ 65.436028][ T4995] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=4995 'syz-executor300' [ 65.457478][ T4995] loop0: detected capacity change from 0 to 1024 [ 65.468019][ T4995] ======================================================= [ 65.468019][ T4995] WARNING: The mand mount option has been deprecated and mount("/dev/loop0", "./bus", "hfsplus", MS_SYNCHRONOUS|MS_MANDLOCK, "") = 0 openat(AT_FDCWD, "./bus", O_RDONLY|O_DIRECTORY) = 3 chdir("./bus") = 0 ioctl(4, LOOP_CLR_FD) = 0 close(4) = 0 open("./bus", O_RDWR|O_CREAT|O_SYNC|O_DIRECT|O_NOATIME|FASYNC, 000) = 4 [ 65.468019][ T4995] and is ignored by this kernel. Remove the mand [ 65.468019][ T4995] option from the mount to silence this warning. [ 65.468019][ T4995] ======================================================= ftruncate(4, 33587199) = -1 ENOSPC (No space left on device) open("./file1", O_RDWR|O_CREAT|O_SYNC|O_DIRECT|O_NOATIME|FASYNC, 000) = 5 [ 65.522117][ T27] audit: type=1800 audit(1686698430.617:2): pid=4995 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="syz-executor300" name="bus" dev="loop0" ino=25 res=0 errno=0 [ 65.560787][ T27] audit: type=1800 audit(1686698430.657:3): pid=4995 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="syz-executor300" name="file1" dev="loop0" ino=20 res=0 errno=0 [ 65.562258][ T4995] [ 65.583080][ T4995] ====================================================== [ 65.590107][ T4995] WARNING: possible circular locking dependency detected [ 65.597120][ T4995] 6.4.0-rc6-syzkaller-00026-gfb054096aea0 #0 Not tainted [ 65.604265][ T4995] ------------------------------------------------------ [ 65.611294][ T4995] syz-executor300/4995 is trying to acquire lock: [ 65.617706][ T4995] ffff88807ec400b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x14a/0x1c0 [ 65.627512][ T4995] [ 65.627512][ T4995] but task is already holding lock: [ 65.634881][ T4995] ffff888079108e88 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2da/0xb40 [ 65.646428][ T4995] [ 65.646428][ T4995] which lock already depends on the new lock. [ 65.646428][ T4995] [ 65.656834][ T4995] [ 65.656834][ T4995] the existing dependency chain (in reverse order) is: [ 65.665867][ T4995] [ 65.665867][ T4995] -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: [ 65.675366][ T4995] lock_acquire+0x1e3/0x520 [ 65.680409][ T4995] __mutex_lock_common+0x1d8/0x2530 [ 65.686171][ T4995] mutex_lock_nested+0x1b/0x20 [ 65.691482][ T4995] hfsplus_file_extend+0x1d6/0x1b10 [ 65.697206][ T4995] hfsplus_bmap_reserve+0x105/0x4e0 [ 65.702931][ T4995] __hfsplus_ext_write_extent+0x2a4/0x5b0 [ 65.709177][ T4995] __hfsplus_ext_cache_extent+0x84/0xe00 [ 65.715364][ T4995] hfsplus_file_extend+0x439/0x1b10 [ 65.721108][ T4995] hfsplus_get_block+0x406/0x14e0 [ 65.726701][ T4995] __block_write_begin_int+0x548/0x1a50 [ 65.732797][ T4995] block_write_begin+0x9c/0x1f0 [ 65.738203][ T4995] cont_write_begin+0x643/0x880 [ 65.743673][ T4995] hfsplus_write_begin+0x8a/0xd0 [ 65.749159][ T4995] cont_write_begin+0x316/0x880 [ 65.754545][ T4995] hfsplus_write_begin+0x8a/0xd0 [ 65.760039][ T4995] generic_cont_expand_simple+0x18b/0x2a0 [ 65.766315][ T4995] hfsplus_setattr+0x16d/0x280 [ 65.771643][ T4995] notify_change+0xc8b/0xf40 [ 65.776966][ T4995] do_truncate+0x220/0x300 [ 65.781921][ T4995] do_sys_ftruncate+0x2e4/0x380 [ 65.787311][ T4995] do_syscall_64+0x41/0xc0 [ 65.792261][ T4995] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 65.798687][ T4995] [ 65.798687][ T4995] -> #0 (&tree->tree_lock/1){+.+.}-{3:3}: [ 65.806703][ T4995] validate_chain+0x166b/0x58f0 [ 65.812093][ T4995] __lock_acquire+0x1316/0x2070 [ 65.817476][ T4995] lock_acquire+0x1e3/0x520 [ 65.822678][ T4995] __mutex_lock_common+0x1d8/0x2530 [ 65.828446][ T4995] mutex_lock_nested+0x1b/0x20 [ 65.833755][ T4995] hfsplus_find_init+0x14a/0x1c0 [ 65.839307][ T4995] hfsplus_file_truncate+0x3fa/0xb40 [ 65.845113][ T4995] hfsplus_setattr+0x1bd/0x280 [ 65.851085][ T4995] notify_change+0xc8b/0xf40 [ 65.856230][ T4995] do_truncate+0x220/0x300 [ 65.861172][ T4995] do_sys_ftruncate+0x2e4/0x380 [ 65.866557][ T4995] do_syscall_64+0x41/0xc0 [ 65.871495][ T4995] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 65.877923][ T4995] [ 65.877923][ T4995] other info that might help us debug this: [ 65.877923][ T4995] [ 65.888146][ T4995] Possible unsafe locking scenario: [ 65.888146][ T4995] [ 65.895594][ T4995] CPU0 CPU1 [ 65.900956][ T4995] ---- ---- [ 65.906318][ T4995] lock(&HFSPLUS_I(inode)->extents_lock); [ 65.912218][ T4995] lock(&tree->tree_lock/1); [ 65.919437][ T4995] lock(&HFSPLUS_I(inode)->extents_lock); [ 65.927889][ T4995] lock(&tree->tree_lock/1); [ 65.932684][ T4995] [ 65.932684][ T4995] *** DEADLOCK *** [ 65.932684][ T4995] [ 65.940830][ T4995] 3 locks held by syz-executor300/4995: [ 65.946389][ T4995] #0: ffff88807c8a6460 (sb_writers#9){.+.+}-{0:0}, at: do_sys_ftruncate+0x24c/0x380 [ 65.955939][ T4995] #1: ffff888079109080 (&sb->s_type->i_mutex_key#14){+.+.}-{3:3}, at: do_truncate+0x20c/0x300 [ 65.966522][ T4995] #2: ffff888079108e88 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2da/0xb40 [ 65.978154][ T4995] [ 65.978154][ T4995] stack backtrace: [ 65.984141][ T4995] CPU: 1 PID: 4995 Comm: syz-executor300 Not tainted 6.4.0-rc6-syzkaller-00026-gfb054096aea0 #0 [ 65.994560][ T4995] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 [ 66.004625][ T4995] Call Trace: [ 66.007912][ T4995] [ 66.010937][ T4995] dump_stack_lvl+0x1e7/0x2d0 [ 66.015630][ T4995] ? nf_tcp_handle_invalid+0x650/0x650 [ 66.021189][ T4995] ? print_circular_bug+0x12b/0x1a0 [ 66.026402][ T4995] check_noncircular+0x2fe/0x3b0 [ 66.031357][ T4995] ? add_chain_block+0x850/0x850 [ 66.036307][ T4995] ? lockdep_lock+0x123/0x2b0 [ 66.041000][ T4995] ? _find_first_zero_bit+0xd4/0x100 [ 66.046410][ T4995] validate_chain+0x166b/0x58f0 [ 66.051299][ T4995] ? reacquire_held_locks+0x660/0x660 [ 66.056707][ T4995] ? mark_lock+0x9a/0x340 [ 66.061078][ T4995] ? lockdep_hardirqs_on_prepare+0x43c/0x7a0 [ 66.067077][ T4995] ? mark_lock+0x9a/0x340 [ 66.071422][ T4995] __lock_acquire+0x1316/0x2070 [ 66.076295][ T4995] lock_acquire+0x1e3/0x520 [ 66.080812][ T4995] ? hfsplus_find_init+0x14a/0x1c0 [ 66.085944][ T4995] ? read_lock_is_recursive+0x20/0x20 [ 66.091327][ T4995] ? hfsplus_setattr+0x1bd/0x280 [ 66.096282][ T4995] ? notify_change+0xc8b/0xf40 [ 66.101061][ T4995] ? __might_sleep+0xc0/0xc0 [ 66.105675][ T4995] __mutex_lock_common+0x1d8/0x2530 [ 66.110880][ T4995] ? hfsplus_find_init+0x14a/0x1c0 [ 66.116009][ T4995] ? hfsplus_find_init+0x14a/0x1c0 [ 66.121130][ T4995] ? mutex_lock_io_nested+0x60/0x60 [ 66.126335][ T4995] ? hfsplus_find_init+0x85/0x1c0 [ 66.131367][ T4995] ? rcu_is_watching+0x15/0xb0 [ 66.136137][ T4995] ? hfsplus_find_init+0x85/0x1c0 [ 66.141342][ T4995] ? __kmalloc+0xe6/0x230 [ 66.145682][ T4995] mutex_lock_nested+0x1b/0x20 [ 66.150983][ T4995] hfsplus_find_init+0x14a/0x1c0 [ 66.155930][ T4995] hfsplus_file_truncate+0x3fa/0xb40 [ 66.161227][ T4995] ? __up_read+0x2bd/0x690 [ 66.165677][ T4995] ? up_read+0x20/0x20 [ 66.169772][ T4995] ? hfsplus_add_extent+0x880/0x880 [ 66.175001][ T4995] ? unmap_mapping_range+0xf8/0x290 [ 66.180243][ T4995] ? unmap_mapping_pages+0x180/0x180 [ 66.185539][ T4995] ? current_time+0x1e0/0x300 [ 66.190232][ T4995] ? truncate_setsize+0xcf/0xf0 [ 66.195093][ T4995] hfsplus_setattr+0x1bd/0x280 [ 66.199871][ T4995] ? hfsplus_fileattr_set+0x330/0x330 [ 66.205258][ T4995] notify_change+0xc8b/0xf40 [ 66.209867][ T4995] do_truncate+0x220/0x300 [ 66.214382][ T4995] ? put_page_bootmem+0x2e0/0x2e0 [ 66.219435][ T4995] ? print_irqtrace_events+0x220/0x220 [ 66.225022][ T4995] do_sys_ftruncate+0x2e4/0x380 [ 66.229937][ T4995] do_syscall_64+0x41/0xc0 [ 66.234375][ T4995] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 66.240371][ T4995] RIP: 0033:0x7fe1177437f9 [ 66.244792][ T4995] 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 [ 66.264404][ T4995] RSP: 002b:00007fffb3c14b18 EFLAGS: 00000246 ORIG_RAX: 000000000000004d [ 66.272833][ T4995] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fe1177437f9 [ 66.280812][ T4995] RDX: 00007fe1177437f9 RSI: 0000000000000000 RDI: 0000000000000005 ftruncate(5, 0) = 0 exit_group(0) = ? +++ exited with 0 +++ [ 66.288794]