./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor107971504 <...> [ 46.558809][ T25] audit: type=1400 audit(1687638093.348:80): avc: denied { rlimitinh } for pid=4856 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1 [ 46.591848][ T25] audit: type=1400 audit(1687638093.348:81): avc: denied { siginh } for pid=4856 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1 [ 47.404190][ T25] audit: type=1400 audit(1687638094.258:82): avc: denied { read } for pid=4430 comm="syslogd" name="log" dev="sda1" ino=1915 scontext=system_u:system_r:syslogd_t tcontext=system_u:object_r:var_t tclass=lnk_file permissive=1 Warning: Permanently added '10.128.1.148' (ECDSA) to the list of known hosts. execve("./syz-executor107971504", ["./syz-executor107971504"], 0x7ffc8a188690 /* 10 vars */) = 0 brk(NULL) = 0x555557445000 brk(0x555557445c40) = 0x555557445c40 arch_prctl(ARCH_SET_FS, 0x555557445300) = 0 uname({sysname="Linux", nodename="syzkaller", ...}) = 0 readlink("/proc/self/exe", "/root/syz-executor107971504", 4096) = 27 brk(0x555557466c40) = 0x555557466c40 brk(0x555557467000) = 0x555557467000 mprotect(0x7f2c1eb52000, 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 [ 62.805757][ T25] audit: type=1400 audit(1687638109.658:83): avc: denied { write } for pid=4989 comm="strace-static-x" path="pipe:[30280]" dev="pipefs" ino=30280 scontext=root:sysadm_r:sysadm_t tcontext=system_u:system_r:sshd_t tclass=fifo_file permissive=1 [ 62.830894][ T25] audit: type=1400 audit(1687638109.678:84): avc: denied { execmem } for pid=4992 comm="syz-executor107" scontext=root:sysadm_r:sysadm_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1 memfd_create("syzkaller", 0) = 3 mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2c16698000 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(0x7f2c16698000, 524288) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 [ 62.833160][ T4992] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=4992 'syz-executor107' [ 62.868794][ T25] audit: type=1400 audit(1687638109.718:85): avc: denied { read write } for pid=4992 comm="syz-executor107" name="loop0" dev="devtmpfs" ino=648 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:fixed_disk_device_t tclass=blk_file permissive=1 [ 62.872006][ T4992] loop0: detected capacity change from 0 to 1024 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 mkdir("./file0", 0777) = 0 [ 62.893215][ T25] audit: type=1400 audit(1687638109.718:86): avc: denied { open } for pid=4992 comm="syz-executor107" path="/dev/loop0" dev="devtmpfs" ino=648 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:fixed_disk_device_t tclass=blk_file permissive=1 [ 62.924360][ T25] audit: type=1400 audit(1687638109.718:87): avc: denied { ioctl } for pid=4992 comm="syz-executor107" path="/dev/loop0" dev="devtmpfs" ino=648 ioctlcmd=0x4c00 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:fixed_disk_device_t tclass=blk_file permissive=1 mount("/dev/loop0", "./file0", "hfsplus", MS_SYNCHRONOUS|MS_RELATIME|MS_I_VERSION, "part=0x0000") = 0 openat(AT_FDCWD, "./file0", O_RDONLY|O_DIRECTORY) = 3 chdir("./file0") = 0 ioctl(4, LOOP_CLR_FD) = 0 close(4) = 0 open(".", O_RDONLY) = 4 mkdirat(4, "\x13\x13\x77\xc5\xfc\x35\xd4\x14\x54\xd5\xd4\x1d\x29\xad\x1a\x60\x29\x59\x81\x46\xe6\xbe\x16\x6e\x41\xad\x0d\xbd\x40\x54\x03\x3c\x9f\x33\xbb\xda\x82\x24\xa2\xf3\xd7\x72\xe7\x63\x6e\x48\xb3\x3c\xbf\x70\x83\x72\xe8\xf1\xb9\x93\x3e\xc5\x12\x77\x43\xbe\x22\x06\x20\x9e\xf0\x2d\xf9\xcb\xf2\xf6\xe8\x80\xd3\x38\x2f", 000) = 0 creat("./file1", 0324) = 5 open(".", O_RDONLY) = 6 symlinkat("\x13\x13\x77\xc5\xfc\x35\xd4\x14\x54\xd5\xd4\x1d\x29\xad\x1a\x60\x29\x59\x81\x46\xe6\xbe\x16\x6e\x41\xad\x0d\xbd\x40\x54\x03\x3c\x9f\x33\xbb\xda\x82\x24\xa2\xf3\xd7\x72\xe7\x63\x6e\x48\xb3\x3c\xbf\x70\x83\x72\xe8\xf1\xb9\x93\x3e\xc5\x12\x77\x43\xbe\x22\x06\x20\x9e\xf0\x2d\xf9\xcb\xf2\xf6\xe8\x80\xd3\x38\x2f", 6, "./file0") = 0 open(".", O_RDONLY) = 7 openat(6, "./file0/file0", O_RDONLY|O_CREAT, 000) = 8 [ 62.950488][ T25] audit: type=1400 audit(1687638109.778:88): avc: denied { mounton } for pid=4992 comm="syz-executor107" path="/root/file0" dev="sda1" ino=1927 scontext=root:sysadm_r:sysadm_t tcontext=root:object_r:user_home_t tclass=dir permissive=1 [ 62.973779][ T25] audit: type=1400 audit(1687638109.808:89): avc: denied { mount } for pid=4992 comm="syz-executor107" name="/" dev="loop0" ino=2 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:dosfs_t tclass=filesystem permissive=1 [ 63.018233][ T4992] [ 63.020586][ T4992] ====================================================== [ 63.027585][ T4992] WARNING: possible circular locking dependency detected [ 63.034583][ T4992] 6.4.0-rc7-syzkaller-00226-ga92b7d26c743 #0 Not tainted [ 63.041585][ T4992] ------------------------------------------------------ [ 63.048585][ T4992] syz-executor107/4992 is trying to acquire lock: [ 63.054980][ T4992] ffff888017b94ec8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1bf/0xf90 [ 63.065978][ T4992] [ 63.065978][ T4992] but task is already holding lock: [ 63.073422][ T4992] ffff88807a3fc0b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x1bb/0x230 [ 63.082915][ T4992] [ 63.082915][ T4992] which lock already depends on the new lock. [ 63.082915][ T4992] [ 63.093310][ T4992] [ 63.093310][ T4992] the existing dependency chain (in reverse order) is: [ 63.102313][ T4992] [ 63.102313][ T4992] -> #1 (&tree->tree_lock){+.+.}-{3:3}: [ 63.110047][ T4992] __mutex_lock+0x12f/0x1350 [ 63.115177][ T4992] hfsplus_file_truncate+0xe93/0x10e0 [ 63.121084][ T4992] hfsplus_setattr+0x1f2/0x320 [ 63.126377][ T4992] notify_change+0xb2c/0x1180 [ 63.131587][ T4992] do_truncate+0x143/0x200 [ 63.136542][ T4992] path_openat+0x2083/0x2750 [ 63.141667][ T4992] do_filp_open+0x1ba/0x410 [ 63.146700][ T4992] do_sys_openat2+0x16d/0x4c0 [ 63.151896][ T4992] __x64_sys_creat+0xcd/0x120 [ 63.157091][ T4992] do_syscall_64+0x39/0xb0 [ 63.162037][ T4992] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 63.168472][ T4992] [ 63.168472][ T4992] -> #0 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: [ 63.177533][ T4992] __lock_acquire+0x2fcd/0x5f30 [ 63.182925][ T4992] lock_acquire+0x1b1/0x520 [ 63.187954][ T4992] __mutex_lock+0x12f/0x1350 [ 63.193158][ T4992] hfsplus_file_extend+0x1bf/0xf90 [ 63.198800][ T4992] hfsplus_bmap_reserve+0x31c/0x410 [ 63.204530][ T4992] hfsplus_rename_cat+0x271/0x1270 [ 63.210175][ T4992] hfsplus_rename+0x11d/0x210 [ 63.215392][ T4992] vfs_rename+0xef6/0x17a0 [ 63.220335][ T4992] do_renameat2+0xc04/0xd40 [ 63.225384][ T4992] __x64_sys_renameat2+0xe8/0x120 [ 63.230937][ T4992] do_syscall_64+0x39/0xb0 [ 63.235874][ T4992] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 63.242302][ T4992] [ 63.242302][ T4992] other info that might help us debug this: [ 63.242302][ T4992] [ 63.252520][ T4992] Possible unsafe locking scenario: [ 63.252520][ T4992] [ 63.259958][ T4992] CPU0 CPU1 [ 63.265316][ T4992] ---- ---- [ 63.270671][ T4992] lock(&tree->tree_lock); [ 63.275171][ T4992] lock(&HFSPLUS_I(inode)->extents_lock); [ 63.283494][ T4992] lock(&tree->tree_lock); [ 63.290513][ T4992] lock(&HFSPLUS_I(inode)->extents_lock); [ 63.296318][ T4992] [ 63.296318][ T4992] *** DEADLOCK *** [ 63.296318][ T4992] [ 63.304451][ T4992] 7 locks held by syz-executor107/4992: [ 63.309986][ T4992] #0: ffff888019350460 (sb_writers#10){.+.+}-{0:0}, at: do_renameat2+0x386/0xd40 [ 63.319238][ T4992] #1: ffff888019350748 (&type->s_vfs_rename_key#2){+.+.}-{3:3}, at: do_renameat2+0x686/0xd40 [ 63.329534][ T4992] #2: ffff888019bf57c0 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: lock_two_directories+0x5b/0x1e0 [ 63.340528][ T4992] #3: ffff888019bf4a40 (&sb->s_type->i_mutex_key#15/2){+.+.}-{3:3}, at: lock_two_directories+0x8f/0x1e0 [ 63.351780][ T4992] #4: ffff8880728b9140 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: lock_two_nondirectories+0xf0/0x110 [ 63.363123][ T4992] #5: ffff8880728b9800 (&sb->s_type->i_mutex_key#15/4){+.+.}-{3:3}, at: lock_two_nondirectories+0xd5/0x110 [ 63.374643][ T4992] #6: ffff88807a3fc0b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x1bb/0x230 [ 63.384572][ T4992] [ 63.384572][ T4992] stack backtrace: [ 63.390463][ T4992] CPU: 0 PID: 4992 Comm: syz-executor107 Not tainted 6.4.0-rc7-syzkaller-00226-ga92b7d26c743 #0 [ 63.400872][ T4992] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 [ 63.410945][ T4992] Call Trace: [ 63.414219][ T4992] [ 63.417148][ T4992] dump_stack_lvl+0xd9/0x150 [ 63.421743][ T4992] check_noncircular+0x25f/0x2e0 [ 63.426688][ T4992] ? register_lock_class+0xbe/0x1120 [ 63.431980][ T4992] ? print_circular_bug+0x730/0x730 [ 63.437183][ T4992] ? arch_stack_walk+0x60/0xf0 [ 63.441971][ T4992] ? kernel_text_address+0x35/0x70 [ 63.447096][ T4992] ? __kernel_text_address+0xd/0x30 [ 63.452312][ T4992] ? unwind_get_return_address+0x55/0xa0 [ 63.457948][ T4992] __lock_acquire+0x2fcd/0x5f30 [ 63.462820][ T4992] ? filter_irq_stacks+0x90/0x90 [ 63.467768][ T4992] ? print_circular_bug+0x730/0x730 [ 63.472970][ T4992] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 63.478969][ T4992] ? unwind_next_frame+0xdf3/0x1e30 [ 63.484172][ T4992] ? save_trace+0x3f/0xb20 [ 63.488595][ T4992] lock_acquire+0x1b1/0x520 [ 63.493108][ T4992] ? hfsplus_file_extend+0x1bf/0xf90 [ 63.498407][ T4992] ? lock_sync+0x190/0x190 [ 63.502829][ T4992] __mutex_lock+0x12f/0x1350 [ 63.507424][ T4992] ? hfsplus_file_extend+0x1bf/0xf90 [ 63.512721][ T4992] ? hfsplus_file_extend+0x1bf/0xf90 [ 63.518018][ T4992] ? mutex_lock_io_nested+0x11a0/0x11a0 [ 63.523574][ T4992] ? lock_sync+0x190/0x190 [ 63.528001][ T4992] hfsplus_file_extend+0x1bf/0xf90 [ 63.533123][ T4992] ? __mutex_lock+0x231/0x1350 [ 63.537896][ T4992] ? hfsplus_free_fork+0x7d0/0x7d0 [ 63.543021][ T4992] ? mutex_lock_io_nested+0x11a0/0x11a0 [ 63.548574][ T4992] hfsplus_bmap_reserve+0x31c/0x410 [ 63.553789][ T4992] hfsplus_rename_cat+0x271/0x1270 [ 63.558916][ T4992] ? hfsplus_delete_cat+0xe40/0xe40 [ 63.564152][ T4992] ? find_held_lock+0x2d/0x110 [ 63.568939][ T4992] ? hfsplus_unlink+0x352/0x830 [ 63.573817][ T4992] ? lock_downgrade+0x690/0x690 [ 63.578681][ T4992] ? pointer+0xc50/0xc50 [ 63.582935][ T4992] ? __mutex_unlock_slowpath+0x157/0x5e0 [ 63.588577][ T4992] ? sprintf+0xc4/0x100 [ 63.592739][ T4992] ? wait_for_completion_io_timeout+0x20/0x20 [ 63.598810][ T4992] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 63.604799][ T4992] ? hfsplus_unlink+0x357/0x830 [ 63.609666][ T4992] ? hfsplus_symlink+0x2e0/0x2e0 [ 63.614612][ T4992] ? down_write_nested+0x153/0x200 [ 63.619731][ T4992] ? _down_write_nest_lock+0x200/0x200 [ 63.625190][ T4992] ? spin_bug+0x1c0/0x1c0 [ 63.629530][ T4992] hfsplus_rename+0x11d/0x210 [ 63.634224][ T4992] ? hfsplus_unlink+0x830/0x830 [ 63.639084][ T4992] vfs_rename+0xef6/0x17a0 [ 63.643511][ T4992] ? path_openat+0x2750/0x2750 [ 63.648282][ T4992] ? d_lookup+0x105/0x170 [ 63.652617][ T4992] ? security_path_rename+0x158/0x230 [ 63.657997][ T4992] do_renameat2+0xc04/0xd40 [ 63.662511][ T4992] ? __ia32_sys_link+0xa0/0xa0 [ 63.667287][ T4992] ? __phys_addr_symbol+0x30/0x70 [ 63.672324][ T4992] ? strncpy_from_user+0x1f8/0x350 [ 63.677447][ T4992] ? _raw_spin_unlock_irq+0x23/0x50 [ 63.682661][ T4992] __x64_sys_renameat2+0xe8/0x120 [ 63.687697][ T4992] do_syscall_64+0x39/0xb0 [ 63.692127][ T4992] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 63.698060][ T4992] RIP: 0033:0x7f2c1eae4a19 [ 63.702481][ T4992] 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 [ 63.722100][ T4992] RSP: 002b:00007ffefade96f8 EFLAGS: 00000246 ORIG_RAX: 000000000000013c [ 63.730529][ T4992] RAX: ffffffffffffffda RBX: 2f30656c69662f2e RCX: 00007f2c1eae4a19 [ 63.738496][ T4992] RDX: 0000000000000007 RSI: 00000000200001c0 RDI: 0000000000000007 [ 63.746464][ T4992] RBP: 00007f2c1eaa42b0 R08: 0000000000000000 R09: 0000000000000000 [ 63.754431][ T4992] R10: 00000000200002c0 R11: 0000000000000246 R12: 00007f2c1eaa4340 [ 63.762401][ T4992] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 renameat2(7, "./file0", 7, "./file0/file0", 0) = 0 exit_group(0) = ? +++ exited with 0 +++ [ 63.770375]