Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/mergerfs-2.31.0/libfuse/ecfd/tests/HAVE_STRUCT_STAT_ST_ATIM.c Examining data/mergerfs-2.31.0/libfuse/ecfd/tests/HAVE_SPLICE.c Examining data/mergerfs-2.31.0/libfuse/ecfd/tests/static_assert.h Examining data/mergerfs-2.31.0/libfuse/ecfd/tests/HAVE_UTIMENSAT.c Examining data/mergerfs-2.31.0/libfuse/ecfd/tests/HAVE_VMSPLICE.c Examining data/mergerfs-2.31.0/libfuse/ecfd/tests/HAVE_FORK.c Examining data/mergerfs-2.31.0/libfuse/util/mount_util.c Examining data/mergerfs-2.31.0/libfuse/util/fusermount.c Examining data/mergerfs-2.31.0/libfuse/util/mount.mergerfs.c Examining data/mergerfs-2.31.0/libfuse/include/fuse_entry.h Examining data/mergerfs-2.31.0/libfuse/include/fuse_common.h Examining data/mergerfs-2.31.0/libfuse/include/kvec.h Examining data/mergerfs-2.31.0/libfuse/include/fuse_attr.h Examining data/mergerfs-2.31.0/libfuse/include/fuse_dirents.h Examining data/mergerfs-2.31.0/libfuse/include/fuse_opt.h Examining data/mergerfs-2.31.0/libfuse/include/fuse_direntplus.h Examining data/mergerfs-2.31.0/libfuse/include/linux_dirent64.h Examining data/mergerfs-2.31.0/libfuse/include/fuse_lowlevel.h Examining data/mergerfs-2.31.0/libfuse/include/extern_c.h Examining data/mergerfs-2.31.0/libfuse/include/stat_utils.h Examining data/mergerfs-2.31.0/libfuse/include/fuse.h Examining data/mergerfs-2.31.0/libfuse/include/fuse_dirent.h Examining data/mergerfs-2.31.0/libfuse/include/fuse_timeouts.h Examining data/mergerfs-2.31.0/libfuse/include/fuse_kernel.h Examining data/mergerfs-2.31.0/libfuse/lib/fuse_misc.h Examining data/mergerfs-2.31.0/libfuse/lib/fuse_mt.c Examining data/mergerfs-2.31.0/libfuse/lib/fuse_i.h Examining data/mergerfs-2.31.0/libfuse/lib/fuse.c Examining data/mergerfs-2.31.0/libfuse/lib/fuse_dirents.c Examining data/mergerfs-2.31.0/libfuse/lib/mount_generic.c Examining data/mergerfs-2.31.0/libfuse/lib/mount_util.h Examining data/mergerfs-2.31.0/libfuse/lib/mount_util.c Examining data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c Examining data/mergerfs-2.31.0/libfuse/lib/fuse_loop_mt.c Examining data/mergerfs-2.31.0/libfuse/lib/fuse_opt.c Examining data/mergerfs-2.31.0/libfuse/lib/buffer.c Examining data/mergerfs-2.31.0/libfuse/lib/fuse_signals.c Examining data/mergerfs-2.31.0/libfuse/lib/fuse_session.c Examining data/mergerfs-2.31.0/libfuse/lib/helper.c Examining data/mergerfs-2.31.0/libfuse/lib/fuse_kern_chan.c Examining data/mergerfs-2.31.0/libfuse/lib/mount.c Examining data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c Examining data/mergerfs-2.31.0/src/config_statfsignore.hpp Examining data/mergerfs-2.31.0/src/func.cpp Examining data/mergerfs-2.31.0/src/fs_lchown.hpp Examining data/mergerfs-2.31.0/src/fs_flock.hpp Examining data/mergerfs-2.31.0/src/resources.cpp Examining data/mergerfs-2.31.0/src/fh.hpp Examining data/mergerfs-2.31.0/src/fs_fchmodat.hpp Examining data/mergerfs-2.31.0/src/policy_epff.cpp Examining data/mergerfs-2.31.0/src/fs_rename.hpp Examining data/mergerfs-2.31.0/src/fs_lsetxattr.hpp Examining data/mergerfs-2.31.0/src/fuse_statfs.hpp Examining data/mergerfs-2.31.0/src/fuse_futimens.hpp Examining data/mergerfs-2.31.0/src/mempools.cpp Examining data/mergerfs-2.31.0/src/fs_futimens.hpp Examining data/mergerfs-2.31.0/src/branch.cpp Examining data/mergerfs-2.31.0/src/fuse_readdir_plus_posix.cpp Examining data/mergerfs-2.31.0/src/fs_stat.hpp Examining data/mergerfs-2.31.0/src/ugid_rwlock.hpp Examining data/mergerfs-2.31.0/src/branch.hpp Examining data/mergerfs-2.31.0/src/fs_fstat.hpp Examining data/mergerfs-2.31.0/src/mergerfs.hpp Examining data/mergerfs-2.31.0/src/fs_fallocate.cpp Examining data/mergerfs-2.31.0/src/fuse_readdir_plus.cpp Examining data/mergerfs-2.31.0/src/fuse_read.cpp Examining data/mergerfs-2.31.0/src/fs_utimensat.hpp Examining data/mergerfs-2.31.0/src/fuse_rename.hpp Examining data/mergerfs-2.31.0/src/config_statfs.hpp Examining data/mergerfs-2.31.0/src/policy_eplus.cpp Examining data/mergerfs-2.31.0/src/fs_mktemp.hpp Examining data/mergerfs-2.31.0/src/fuse_readdir.hpp Examining data/mergerfs-2.31.0/src/policy_mfs.cpp Examining data/mergerfs-2.31.0/src/fuse_copy_file_range.cpp Examining data/mergerfs-2.31.0/src/fs_realpathize.cpp Examining data/mergerfs-2.31.0/src/config_inodecalc.hpp Examining data/mergerfs-2.31.0/src/fuse_readdir_plus_linux.hpp Examining data/mergerfs-2.31.0/src/policy_cache.cpp Examining data/mergerfs-2.31.0/src/fs_glob.cpp Examining data/mergerfs-2.31.0/src/fs_devid.hpp Examining data/mergerfs-2.31.0/src/fs_fsetxattr.hpp Examining data/mergerfs-2.31.0/src/fs_getdents64.hpp Examining data/mergerfs-2.31.0/src/fs_findallfiles.cpp Examining data/mergerfs-2.31.0/src/fs_statvfs_cache.hpp Examining data/mergerfs-2.31.0/src/func.hpp Examining data/mergerfs-2.31.0/src/fs_copy_file_range.hpp Examining data/mergerfs-2.31.0/src/fuse_read_buf.cpp Examining data/mergerfs-2.31.0/src/hw_cpu.hpp Examining data/mergerfs-2.31.0/src/fuse_mkdir.cpp Examining data/mergerfs-2.31.0/src/fuse_flush.hpp Examining data/mergerfs-2.31.0/src/policy_invalid.cpp Examining data/mergerfs-2.31.0/src/fuse_readdir_posix.hpp Examining data/mergerfs-2.31.0/src/policy.cpp Examining data/mergerfs-2.31.0/src/config_nfsopenhack.hpp Examining data/mergerfs-2.31.0/src/rwlock.hpp Examining data/mergerfs-2.31.0/src/fs_copydata_copy_file_range.cpp Examining data/mergerfs-2.31.0/src/fs_copydata_readwrite.hpp Examining data/mergerfs-2.31.0/src/fs_realpathize.hpp Examining data/mergerfs-2.31.0/src/fs_clonefile.hpp Examining data/mergerfs-2.31.0/src/fuse_destroy.hpp Examining data/mergerfs-2.31.0/src/policy_msppfrd.cpp Examining data/mergerfs-2.31.0/src/policy_pfrd.cpp Examining data/mergerfs-2.31.0/src/num.cpp Examining data/mergerfs-2.31.0/src/fs_acl.hpp Examining data/mergerfs-2.31.0/src/fuse_free_hide.hpp Examining data/mergerfs-2.31.0/src/policy_eplfs.cpp Examining data/mergerfs-2.31.0/src/fuse_readlink.cpp Examining data/mergerfs-2.31.0/src/policy_ff.cpp Examining data/mergerfs-2.31.0/src/fuse_utimens.cpp Examining data/mergerfs-2.31.0/src/fs_faccessat.hpp Examining data/mergerfs-2.31.0/src/fs_readlink.hpp Examining data/mergerfs-2.31.0/src/fuse_chown.cpp Examining data/mergerfs-2.31.0/src/enum.hpp Examining data/mergerfs-2.31.0/src/fs_fchown.hpp Examining data/mergerfs-2.31.0/src/fs_info.cpp Examining data/mergerfs-2.31.0/src/fs_fallocate.hpp Examining data/mergerfs-2.31.0/src/fs_lgetxattr.hpp Examining data/mergerfs-2.31.0/src/fs_lstat.hpp Examining data/mergerfs-2.31.0/src/fuse_free_hide.cpp Examining data/mergerfs-2.31.0/src/fuse_fsyncdir.hpp Examining data/mergerfs-2.31.0/src/buildmap.hpp Examining data/mergerfs-2.31.0/src/fs_write.hpp Examining data/mergerfs-2.31.0/src/fileinfo.hpp Examining data/mergerfs-2.31.0/src/fuse_futimens.cpp Examining data/mergerfs-2.31.0/src/fs_utimensat_freebsd.hpp Examining data/mergerfs-2.31.0/src/fuse_utimens.hpp Examining data/mergerfs-2.31.0/src/fs_attr.hpp Examining data/mergerfs-2.31.0/src/fuse_symlink.hpp Examining data/mergerfs-2.31.0/src/fs_statvfs.hpp Examining data/mergerfs-2.31.0/src/fuse_access.cpp Examining data/mergerfs-2.31.0/src/fuse_copy_file_range.hpp Examining data/mergerfs-2.31.0/src/ugid.hpp Examining data/mergerfs-2.31.0/src/to_string.hpp Examining data/mergerfs-2.31.0/src/rnd.cpp Examining data/mergerfs-2.31.0/src/policy_lfs.cpp Examining data/mergerfs-2.31.0/src/fuse_readdir_linux.cpp Examining data/mergerfs-2.31.0/src/fs_cow.hpp Examining data/mergerfs-2.31.0/src/config.cpp Examining data/mergerfs-2.31.0/src/fuse_releasedir.hpp Examining data/mergerfs-2.31.0/src/fs_exists.hpp Examining data/mergerfs-2.31.0/src/xattr.hpp Examining data/mergerfs-2.31.0/src/fuse_getxattr.cpp Examining data/mergerfs-2.31.0/src/fuse_destroy.cpp Examining data/mergerfs-2.31.0/src/fuse_symlink.cpp Examining data/mergerfs-2.31.0/src/fs_lremovexattr.hpp Examining data/mergerfs-2.31.0/src/fs_cow.cpp Examining data/mergerfs-2.31.0/src/fuse_removexattr.cpp Examining data/mergerfs-2.31.0/src/fuse_fallocate.cpp Examining data/mergerfs-2.31.0/src/fs_dup.hpp Examining data/mergerfs-2.31.0/src/policy_rand.cpp Examining data/mergerfs-2.31.0/src/fuse_ftruncate.hpp Examining data/mergerfs-2.31.0/src/fuse_prepare_hide.cpp Examining data/mergerfs-2.31.0/src/policy_rv.hpp Examining data/mergerfs-2.31.0/src/fuse_read.hpp Examining data/mergerfs-2.31.0/src/fuse_read_buf.hpp Examining data/mergerfs-2.31.0/src/fuse_init.hpp Examining data/mergerfs-2.31.0/src/fuse_write.cpp Examining data/mergerfs-2.31.0/src/policy_error.hpp Examining data/mergerfs-2.31.0/src/fuse_fsyncdir.cpp Examining data/mergerfs-2.31.0/src/fs_findonfs.cpp Examining data/mergerfs-2.31.0/src/fuse_opendir.cpp Examining data/mergerfs-2.31.0/src/fuse_write_buf.hpp Examining data/mergerfs-2.31.0/src/str.hpp Examining data/mergerfs-2.31.0/src/stat_util.hpp Examining data/mergerfs-2.31.0/src/fuse_create.hpp Examining data/mergerfs-2.31.0/src/fs_rmdir.hpp Examining data/mergerfs-2.31.0/src/option_parser.hpp Examining data/mergerfs-2.31.0/src/fuse_readdir_plus.hpp Examining data/mergerfs-2.31.0/src/hw_cpu.cpp Examining data/mergerfs-2.31.0/src/config_readdir.hpp Examining data/mergerfs-2.31.0/src/fuse_mkdir.hpp Examining data/mergerfs-2.31.0/src/fs_closedir.hpp Examining data/mergerfs-2.31.0/src/version.hpp Examining data/mergerfs-2.31.0/src/fuse_unlink.cpp Examining data/mergerfs-2.31.0/src/symlinkify.hpp Examining data/mergerfs-2.31.0/src/fuse_fsync.cpp Examining data/mergerfs-2.31.0/src/fuse_mknod.cpp Examining data/mergerfs-2.31.0/src/fuse_flock.cpp Examining data/mergerfs-2.31.0/src/fs_mktemp.cpp Examining data/mergerfs-2.31.0/src/fs_clonefile.cpp Examining data/mergerfs-2.31.0/src/fs_setfl.hpp Examining data/mergerfs-2.31.0/src/fuse_chmod.hpp Examining data/mergerfs-2.31.0/src/fuse_link.cpp Examining data/mergerfs-2.31.0/src/fuse_fchmod.cpp Examining data/mergerfs-2.31.0/src/assert.hpp Examining data/mergerfs-2.31.0/src/fs_has_space.hpp Examining data/mergerfs-2.31.0/src/fuse_ioctl.cpp Examining data/mergerfs-2.31.0/src/mempools.hpp Examining data/mergerfs-2.31.0/src/fs_lchmod.hpp Examining data/mergerfs-2.31.0/src/policy_eprand.cpp Examining data/mergerfs-2.31.0/src/fs_getfl.hpp Examining data/mergerfs-2.31.0/src/policy.hpp Examining data/mergerfs-2.31.0/src/fs_ioctl.hpp Examining data/mergerfs-2.31.0/src/config_moveonenospc.cpp Examining data/mergerfs-2.31.0/src/category.hpp Examining data/mergerfs-2.31.0/src/fuse_prepare_hide.hpp Examining data/mergerfs-2.31.0/src/config_moveonenospc.hpp Examining data/mergerfs-2.31.0/src/config.hpp Examining data/mergerfs-2.31.0/src/fs_unlink.hpp Examining data/mergerfs-2.31.0/src/ugid.cpp Examining data/mergerfs-2.31.0/src/policy_all.cpp Examining data/mergerfs-2.31.0/src/fs_xattr.hpp Examining data/mergerfs-2.31.0/src/fs_sendfile.cpp Examining data/mergerfs-2.31.0/src/fuse_fchmod.hpp Examining data/mergerfs-2.31.0/src/fs_mknod.hpp Examining data/mergerfs-2.31.0/src/fs_xattr.cpp Examining data/mergerfs-2.31.0/src/fs_utimensat_generic.hpp Examining data/mergerfs-2.31.0/src/fs_inode.cpp Examining data/mergerfs-2.31.0/src/fs_movefile.cpp Examining data/mergerfs-2.31.0/src/fs_ftruncate.hpp Examining data/mergerfs-2.31.0/src/dirinfo.hpp Examining data/mergerfs-2.31.0/src/fs_lutimens.hpp Examining data/mergerfs-2.31.0/src/fs_futimesat.hpp Examining data/mergerfs-2.31.0/src/fs_llistxattr.hpp Examining data/mergerfs-2.31.0/src/fs_file_size.hpp Examining data/mergerfs-2.31.0/src/fuse_readlink.hpp Examining data/mergerfs-2.31.0/src/fuse_removexattr.hpp Examining data/mergerfs-2.31.0/src/fs_fchmod.hpp Examining data/mergerfs-2.31.0/src/policy_epall.cpp Examining data/mergerfs-2.31.0/src/fuse_setxattr.hpp Examining data/mergerfs-2.31.0/src/nonstd/optional.hpp Examining data/mergerfs-2.31.0/src/fs_fsync.hpp Examining data/mergerfs-2.31.0/src/config_cachefiles.hpp Examining data/mergerfs-2.31.0/src/fuse_getattr.cpp Examining data/mergerfs-2.31.0/src/fuse_fallocate.hpp Examining data/mergerfs-2.31.0/src/fs_mkdir.hpp Examining data/mergerfs-2.31.0/src/fs_ficlone.cpp Examining data/mergerfs-2.31.0/src/fs_attr.cpp Examining data/mergerfs-2.31.0/src/fuse_mknod.hpp Examining data/mergerfs-2.31.0/src/fs_flistxattr.hpp Examining data/mergerfs-2.31.0/src/locked_fixed_mem_pool.hpp Examining data/mergerfs-2.31.0/src/fuse_write.hpp Examining data/mergerfs-2.31.0/src/fuse_release.hpp Examining data/mergerfs-2.31.0/src/config_statfsignore.cpp Examining data/mergerfs-2.31.0/src/config_cachefiles.cpp Examining data/mergerfs-2.31.0/src/fs_fstatat.hpp Examining data/mergerfs-2.31.0/src/fs_clonepath.cpp Examining data/mergerfs-2.31.0/src/tofrom_string.hpp Examining data/mergerfs-2.31.0/src/fs_link.hpp Examining data/mergerfs-2.31.0/src/fuse_rmdir.hpp Examining data/mergerfs-2.31.0/src/fs_dirfd.hpp Examining data/mergerfs-2.31.0/src/fs_fgetxattr.hpp Examining data/mergerfs-2.31.0/src/statvfs_util.hpp Examining data/mergerfs-2.31.0/src/policy_epmfs.cpp Examining data/mergerfs-2.31.0/src/fs_copydata.cpp Examining data/mergerfs-2.31.0/src/policy_mspmfs.cpp Examining data/mergerfs-2.31.0/src/fuse_statfs.cpp Examining data/mergerfs-2.31.0/src/rnd.hpp Examining data/mergerfs-2.31.0/src/fs_copy_file_range.cpp Examining data/mergerfs-2.31.0/src/fuse_ftruncate.cpp Examining data/mergerfs-2.31.0/src/fs_sendfile.hpp Examining data/mergerfs-2.31.0/src/fs_glob.hpp Examining data/mergerfs-2.31.0/src/tofrom_wrapper.hpp Examining data/mergerfs-2.31.0/src/config_xattr.hpp Examining data/mergerfs-2.31.0/src/fs_remove.hpp Examining data/mergerfs-2.31.0/src/fuse_readdir_posix.cpp Examining data/mergerfs-2.31.0/src/fuse_open.cpp Examining data/mergerfs-2.31.0/src/ef.hpp Examining data/mergerfs-2.31.0/src/fuse_ioctl.hpp Examining data/mergerfs-2.31.0/src/fs_acl.cpp Examining data/mergerfs-2.31.0/src/fs_fadvise.cpp Examining data/mergerfs-2.31.0/src/config_nfsopenhack.cpp Examining data/mergerfs-2.31.0/src/fuse_fchown.hpp Examining data/mergerfs-2.31.0/src/fs_movefile.hpp Examining data/mergerfs-2.31.0/src/fuse_fchown.cpp Examining data/mergerfs-2.31.0/src/buildvector.hpp Examining data/mergerfs-2.31.0/src/policy_msplus.cpp Examining data/mergerfs-2.31.0/src/mergerfs.cpp Examining data/mergerfs-2.31.0/src/fuse_flock.hpp Examining data/mergerfs-2.31.0/src/wyhash.h Examining data/mergerfs-2.31.0/src/fs_info_t.hpp Examining data/mergerfs-2.31.0/src/policy_cache.hpp Examining data/mergerfs-2.31.0/src/policy_erofs.cpp Examining data/mergerfs-2.31.0/src/fixed_mem_pool.hpp Examining data/mergerfs-2.31.0/src/fuse_chown.hpp Examining data/mergerfs-2.31.0/src/func_category.cpp Examining data/mergerfs-2.31.0/src/fs_utimensat_linux.hpp Examining data/mergerfs-2.31.0/src/fs_copydata.hpp Examining data/mergerfs-2.31.0/src/fuse_listxattr.hpp Examining data/mergerfs-2.31.0/src/fs_close.hpp Examining data/mergerfs-2.31.0/src/endian.hpp Examining data/mergerfs-2.31.0/src/fuse_fsync.hpp Examining data/mergerfs-2.31.0/src/fs_realpath.hpp Examining data/mergerfs-2.31.0/src/fs_readdir.hpp Examining data/mergerfs-2.31.0/src/to_string.cpp Examining data/mergerfs-2.31.0/src/fuse_rename.cpp Examining data/mergerfs-2.31.0/src/fs_ficlone.hpp Examining data/mergerfs-2.31.0/src/fs_statvfs_cache.cpp Examining data/mergerfs-2.31.0/src/fuse_release.cpp Examining data/mergerfs-2.31.0/src/khash.h Examining data/mergerfs-2.31.0/src/fs_has_space.cpp Examining data/mergerfs-2.31.0/src/fuse_create.cpp Examining data/mergerfs-2.31.0/src/policy_msplfs.cpp Examining data/mergerfs-2.31.0/src/func_category.hpp Examining data/mergerfs-2.31.0/src/fuse_write_buf.cpp Examining data/mergerfs-2.31.0/src/fs_getfl.cpp Examining data/mergerfs-2.31.0/src/fs_setfl.cpp Examining data/mergerfs-2.31.0/src/config_inodecalc.cpp Examining data/mergerfs-2.31.0/src/fs_getdents64.cpp Examining data/mergerfs-2.31.0/src/fuse_readdir_linux.hpp Examining data/mergerfs-2.31.0/src/fs_path.cpp Examining data/mergerfs-2.31.0/src/fuse_truncate.cpp Examining data/mergerfs-2.31.0/src/resources.hpp Examining data/mergerfs-2.31.0/src/ugid_linux.hpp Examining data/mergerfs-2.31.0/src/fs_fdatasync.hpp Examining data/mergerfs-2.31.0/src/fs_futimesat.cpp Examining data/mergerfs-2.31.0/src/fuse_readdir_plus_linux.cpp Examining data/mergerfs-2.31.0/src/from_string.cpp Examining data/mergerfs-2.31.0/src/fs_clonepath.hpp Examining data/mergerfs-2.31.0/src/fuse_fgetattr.cpp Examining data/mergerfs-2.31.0/src/fs_read.hpp Examining data/mergerfs-2.31.0/src/fuse_releasedir.cpp Examining data/mergerfs-2.31.0/src/gidcache.hpp Examining data/mergerfs-2.31.0/src/fs_path.hpp Examining data/mergerfs-2.31.0/src/fuse_chmod.cpp Examining data/mergerfs-2.31.0/src/str.cpp Examining data/mergerfs-2.31.0/src/fuse_setxattr.cpp Examining data/mergerfs-2.31.0/src/fs_stat_utils.hpp Examining data/mergerfs-2.31.0/src/fuse_open.hpp Examining data/mergerfs-2.31.0/src/fuse_fgetattr.hpp Examining data/mergerfs-2.31.0/src/fs_inode.hpp Examining data/mergerfs-2.31.0/src/fs_findonfs.hpp Examining data/mergerfs-2.31.0/src/fs_fadvise.hpp Examining data/mergerfs-2.31.0/src/fs_futimens_linux.hpp Examining data/mergerfs-2.31.0/src/fuse_readdir_plus_posix.hpp Examining data/mergerfs-2.31.0/src/fuse_link.hpp Examining data/mergerfs-2.31.0/src/gidcache.cpp Examining data/mergerfs-2.31.0/src/fuse_flush.cpp Examining data/mergerfs-2.31.0/src/fs_findallfiles.hpp Examining data/mergerfs-2.31.0/src/fuse_init.cpp Examining data/mergerfs-2.31.0/src/fuse_getxattr.hpp Examining data/mergerfs-2.31.0/src/funcs.hpp Examining data/mergerfs-2.31.0/src/num.hpp Examining data/mergerfs-2.31.0/src/fuse_opendir.hpp Examining data/mergerfs-2.31.0/src/fs_truncate.hpp Examining data/mergerfs-2.31.0/src/fs_symlink.hpp Examining data/mergerfs-2.31.0/src/fuse_listxattr.cpp Examining data/mergerfs-2.31.0/src/hashset.hpp Examining data/mergerfs-2.31.0/src/policy_newest.cpp Examining data/mergerfs-2.31.0/src/fs_futimens_generic.hpp Examining data/mergerfs-2.31.0/src/policy_eppfrd.cpp Examining data/mergerfs-2.31.0/src/fs_info.hpp Examining data/mergerfs-2.31.0/src/option_parser.cpp Examining data/mergerfs-2.31.0/src/fuse_rmdir.cpp Examining data/mergerfs-2.31.0/src/config_xattr.cpp Examining data/mergerfs-2.31.0/src/fs_open.hpp Examining data/mergerfs-2.31.0/src/fs_copydata_readwrite.cpp Examining data/mergerfs-2.31.0/src/fs_eaccess.hpp Examining data/mergerfs-2.31.0/src/fuse_unlink.hpp Examining data/mergerfs-2.31.0/src/errno.hpp Examining data/mergerfs-2.31.0/src/policy_lus.cpp Examining data/mergerfs-2.31.0/src/from_string.hpp Examining data/mergerfs-2.31.0/src/fuse_readdir.cpp Examining data/mergerfs-2.31.0/src/fs_copydata_copy_file_range.hpp Examining data/mergerfs-2.31.0/src/fuse_access.hpp Examining data/mergerfs-2.31.0/src/fs_file_size.cpp Examining data/mergerfs-2.31.0/src/fuse_truncate.hpp Examining data/mergerfs-2.31.0/src/fs_opendir.hpp Examining data/mergerfs-2.31.0/src/fs_futimens_freebsd_11.hpp Examining data/mergerfs-2.31.0/src/config_readdir.cpp Examining data/mergerfs-2.31.0/src/config_statfs.cpp Examining data/mergerfs-2.31.0/src/fuse_getattr.hpp Examining data/mergerfs-2.31.0/src/fs_lseek.hpp FINAL RESULTS: data/mergerfs-2.31.0/libfuse/include/fuse.h:90:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. int (*readlink) (const char *, char *, size_t); data/mergerfs-2.31.0/libfuse/include/fuse.h:133:9: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. int (*chmod) (const char *, mode_t); data/mergerfs-2.31.0/libfuse/include/fuse.h:137:9: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. int (*chown) (const char *, uid_t, gid_t); data/mergerfs-2.31.0/libfuse/include/fuse_lowlevel.h:283:10: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. void (*readlink) (fuse_req_t req, fuse_ino_t ino); data/mergerfs-2.31.0/libfuse/lib/fuse.c:1942:14: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (fs->op.chown) { data/mergerfs-2.31.0/libfuse/lib/fuse.c:1947:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. return fs->op.chown(path, uid, gid); data/mergerfs-2.31.0/libfuse/lib/fuse.c:2049:14: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if (fs->op.readlink) { data/mergerfs-2.31.0/libfuse/lib/fuse.c:2054:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. return fs->op.readlink(path, buf, len); data/mergerfs-2.31.0/libfuse/lib/fuse.c:2626:14: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (fs->op.chmod) data/mergerfs-2.31.0/libfuse/lib/fuse.c:2627:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. return fs->op.chmod(path, mode); data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1103:18: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if (req->f->op.readlink) data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1104:16: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. req->f->op.readlink(req, nodeid); data/mergerfs-2.31.0/src/config.cpp:125:40: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. _map["func.chmod"] = &func.chmod; data/mergerfs-2.31.0/src/config.cpp:126:40: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _map["func.chown"] = &func.chown; data/mergerfs-2.31.0/src/config.cpp:135:40: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. _map["func.readlink"] = &func.readlink; data/mergerfs-2.31.0/src/fs_lchmod.hpp:38:14: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. return ::chmod(pathname_,mode_); data/mergerfs-2.31.0/src/fs_readlink.hpp:30:3: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. readlink(const std::string &path_, data/mergerfs-2.31.0/src/fs_readlink.hpp:34:14: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. return ::readlink(path_.c_str(),buf_,bufsiz_); data/mergerfs-2.31.0/src/func_category.cpp:69:14: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. (&funcs_.chmod) data/mergerfs-2.31.0/src/func_category.cpp:70:14: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. (&funcs_.chown) data/mergerfs-2.31.0/src/func_category.cpp:89:14: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. (&funcs_.readlink); data/mergerfs-2.31.0/src/funcs.hpp:27:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. FuncChmod chmod; data/mergerfs-2.31.0/src/funcs.hpp:28:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. FuncChown chown; data/mergerfs-2.31.0/src/funcs.hpp:37:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. FuncReadlink readlink; data/mergerfs-2.31.0/src/fuse_chmod.cpp:89:3: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(Policy::Func::Action actionFunc_, data/mergerfs-2.31.0/src/fuse_chmod.cpp:121:3: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(const char *fusepath_, data/mergerfs-2.31.0/src/fuse_chmod.cpp:128:15: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. return l::chmod(config.func.chmod.policy, data/mergerfs-2.31.0/src/fuse_chmod.cpp:128:33: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. return l::chmod(config.func.chmod.policy, data/mergerfs-2.31.0/src/fuse_chmod.hpp:22:3: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(const char *fusepath, data/mergerfs-2.31.0/src/fuse_chown.cpp:89:3: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. chown(Policy::Func::Action actionFunc_, data/mergerfs-2.31.0/src/fuse_chown.cpp:122:3: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. chown(const char *fusepath_, data/mergerfs-2.31.0/src/fuse_chown.cpp:130:15: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. return l::chown(config.func.chown.policy, data/mergerfs-2.31.0/src/fuse_chown.cpp:130:33: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. return l::chown(config.func.chown.policy, data/mergerfs-2.31.0/src/fuse_chown.hpp:22:3: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. chown(const char *fusepath, data/mergerfs-2.31.0/src/fuse_readlink.cpp:43:14: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. rv = fs::readlink(fullpath_,buf_,size_); data/mergerfs-2.31.0/src/fuse_readlink.cpp:95:3: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. readlink(Policy::Func::Search searchFunc_, data/mergerfs-2.31.0/src/fuse_readlink.cpp:118:3: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. readlink(const char *fusepath_, data/mergerfs-2.31.0/src/fuse_readlink.cpp:126:15: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. return l::readlink(config.func.readlink.policy, data/mergerfs-2.31.0/src/fuse_readlink.cpp:126:36: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. return l::readlink(config.func.readlink.policy, data/mergerfs-2.31.0/src/fuse_readlink.hpp:22:3: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. readlink(const char *fusepath, data/mergerfs-2.31.0/src/mergerfs.cpp:85:34: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. ops_.chmod = FUSE::chmod; data/mergerfs-2.31.0/src/mergerfs.cpp:86:34: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. ops_.chown = FUSE::chown; data/mergerfs-2.31.0/src/mergerfs.cpp:118:34: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. ops_.readlink = FUSE::readlink; data/mergerfs-2.31.0/libfuse/include/fuse.h:351:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. int (*access) (const char *, int); data/mergerfs-2.31.0/libfuse/include/fuse_lowlevel.h:754:10: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void (*access) (fuse_req_t req, fuse_ino_t ino, int mask); data/mergerfs-2.31.0/libfuse/lib/fuse.c:722:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(node->inline_name, name); data/mergerfs-2.31.0/libfuse/lib/fuse.c:2035:14: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (fs->op.access) { data/mergerfs-2.31.0/libfuse/lib/fuse.c:2039:19: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return fs->op.access(path, mask); data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1093:18: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (req->f->op.access) data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1094:16: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. req->f->op.access(req, nodeid, arg->mask); data/mergerfs-2.31.0/libfuse/lib/fuse_opt.c:218:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(param, format, var) != 1) { data/mergerfs-2.31.0/libfuse/lib/fuse_opt.c:265:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newarg + sep, param); data/mergerfs-2.31.0/libfuse/lib/helper.c:140:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(subtype_opt, "-osubtype=%s", basename); data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c:107:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(FUSERMOUNT_PROG " --help"); data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c:113:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(FUSERMOUNT_PROG " --version"); data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c:155:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(device_path, SPECNAMELEN + 12, _PATH_DEV "%s", dev); data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c:169:5: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(umount_cmd, (char **)argv); data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c:298:7: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(mountprog, (char **) argv); data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:145:3: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execv(FUSERMOUNT_DIR "/mergerfs-" FUSERMOUNT_PROG, (char **) argv); data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:146:3: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp("mergerfs-" FUSERMOUNT_PROG, (char **) argv); data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:147:3: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execv(FUSERMOUNT_DIR "/" FUSERMOUNT_PROG, (char **) argv); data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:148:3: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(FUSERMOUNT_PROG, (char **) argv); data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:478:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(type, mo->blkdev ? "fuseblk" : "fuse"); data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:481:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(type, mo->subtype); data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:483:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(source, data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:489:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(type, mo->blkdev ? "fuseblk" : "fuse"); data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:492:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(source, "%s#%s", mo->subtype, data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:495:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(source, type); data/mergerfs-2.31.0/libfuse/lib/mount_util.c:64:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. res = access(_PATH_MOUNTED, W_OK); data/mergerfs-2.31.0/libfuse/lib/mount_util.c:103:5: [4] (shell) execle: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execle("/bin/mount", "/bin/mount", "--no-canonicalize", "-i", data/mergerfs-2.31.0/libfuse/lib/mount_util.c:157:7: [4] (shell) execle: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execle("/bin/umount", "/bin/umount", "-i", rel_mnt, data/mergerfs-2.31.0/libfuse/lib/mount_util.c:160:7: [4] (shell) execle: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execle("/bin/umount", "/bin/umount", "-i", rel_mnt, data/mergerfs-2.31.0/libfuse/lib/mount_util.c:222:5: [4] (shell) execle: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execle("/bin/umount", "/bin/umount", "--no-canonicalize", "-i", data/mergerfs-2.31.0/libfuse/lib/mount_util.c:304:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dst, "%s%s", buf, lastcomp); data/mergerfs-2.31.0/libfuse/lib/mount_util.c:306:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dst, "%s/%s", buf, lastcomp); data/mergerfs-2.31.0/libfuse/util/fusermount.c:638:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newopts + oldsize, ",%s", opt); data/mergerfs-2.31.0/libfuse/util/fusermount.c:675:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(*mnt_optsp, user); data/mergerfs-2.31.0/libfuse/util/fusermount.c:830:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(type, "%s.%s", blkdev ? "fuseblk" : "fuse", subtype); data/mergerfs-2.31.0/libfuse/util/fusermount.c:832:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(type, blkdev ? "fuseblk" : "fuse"); data/mergerfs-2.31.0/libfuse/util/fusermount.c:835:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(source, fsname); data/mergerfs-2.31.0/libfuse/util/fusermount.c:837:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(source, subtype ? subtype : dev); data/mergerfs-2.31.0/libfuse/util/fusermount.c:842:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(type, blkdev ? "fuseblk" : "fuse"); data/mergerfs-2.31.0/libfuse/util/fusermount.c:845:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(source, "%s#%s", subtype, fsname); data/mergerfs-2.31.0/libfuse/util/fusermount.c:847:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(source, type); data/mergerfs-2.31.0/libfuse/util/fusermount.c:957:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. res = access(mnt, W_OK); data/mergerfs-2.31.0/libfuse/util/mount.mergerfs.c:68:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(options, opt); data/mergerfs-2.31.0/libfuse/util/mount.mergerfs.c:71:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(options, opt); data/mergerfs-2.31.0/libfuse/util/mount.mergerfs.c:227:2: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "/bin/sh", "-c", command, NULL); data/mergerfs-2.31.0/libfuse/util/mount_util.c:64:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. res = access(_PATH_MOUNTED, W_OK); data/mergerfs-2.31.0/libfuse/util/mount_util.c:103:3: [4] (shell) execle: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execle("/bin/mount", "/bin/mount", "--no-canonicalize", "-i", data/mergerfs-2.31.0/libfuse/util/mount_util.c:157:4: [4] (shell) execle: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execle("/bin/umount", "/bin/umount", "-i", rel_mnt, data/mergerfs-2.31.0/libfuse/util/mount_util.c:160:4: [4] (shell) execle: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execle("/bin/umount", "/bin/umount", "-i", rel_mnt, data/mergerfs-2.31.0/libfuse/util/mount_util.c:222:3: [4] (shell) execle: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execle("/bin/umount", "/bin/umount", "--no-canonicalize", "-i", data/mergerfs-2.31.0/libfuse/util/mount_util.c:304:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dst, "%s%s", buf, lastcomp); data/mergerfs-2.31.0/libfuse/util/mount_util.c:306:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dst, "%s/%s", buf, lastcomp); data/mergerfs-2.31.0/src/config.cpp:124:40: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. _map["func.access"] = &func.access; data/mergerfs-2.31.0/src/fs_cow.cpp:119:20: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). dst_fd = fs::mktemp(&dst_fullpath,O_WRONLY); data/mergerfs-2.31.0/src/fs_mktemp.cpp:51:3: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). mktemp(string *base_, data/mergerfs-2.31.0/src/fs_mktemp.hpp:26:3: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). mktemp(std::string *base, data/mergerfs-2.31.0/src/fs_movefile.cpp:99:17: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). fdout = fs::mktemp(&fdout_temp,fdin_flags); data/mergerfs-2.31.0/src/func_category.cpp:84:14: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. (&funcs_.access) data/mergerfs-2.31.0/src/funcs.hpp:26:19: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. FuncAccess access; data/mergerfs-2.31.0/src/fuse_access.cpp:33:3: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. access(Policy::Func::Search searchFunc, data/mergerfs-2.31.0/src/fuse_access.cpp:57:3: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. access(const char *fusepath, data/mergerfs-2.31.0/src/fuse_access.cpp:64:15: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return l::access(config.func.access.policy, data/mergerfs-2.31.0/src/fuse_access.cpp:64:34: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return l::access(config.func.access.policy, data/mergerfs-2.31.0/src/fuse_access.hpp:22:3: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. access(const char *fusepath, data/mergerfs-2.31.0/src/fuse_ioctl.cpp:188:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(const std::string &s_, data/mergerfs-2.31.0/src/fuse_ioctl.cpp:211:15: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). return l::strcpy(keys,data_); data/mergerfs-2.31.0/src/fuse_ioctl.cpp:232:15: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). return l::strcpy(val,data_); data/mergerfs-2.31.0/src/fuse_ioctl.cpp:268:15: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). return l::strcpy(basepaths[0],data_); data/mergerfs-2.31.0/src/fuse_ioctl.cpp:292:15: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). return l::strcpy(fusepath,data_); data/mergerfs-2.31.0/src/fuse_ioctl.cpp:312:15: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). return l::strcpy(fullpath,data_); data/mergerfs-2.31.0/src/fuse_ioctl.cpp:346:15: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). return l::strcpy(concated,data_); data/mergerfs-2.31.0/src/mergerfs.cpp:83:34: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. ops_.access = FUSE::access; data/mergerfs-2.31.0/libfuse/lib/fuse.c:4422:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/mergerfs-2.31.0/libfuse/lib/fuse_loop_mt.c:111:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. stack_size = getenv(ENVNAME_THREAD_STACK); data/mergerfs-2.31.0/libfuse/lib/helper.c:108:11: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(arg, mountpoint) == NULL) { data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c:223:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. fdnam = getenv("FUSE_DEV_FD"); data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c:241:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. dev = getenv("FUSE_DEV_NAME"); data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c:252:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("FUSE_NO_MOUNT") || ! mountpoint) data/mergerfs-2.31.0/libfuse/lib/mount_util.c:291:7: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(toresolv, buf) == NULL) { data/mergerfs-2.31.0/libfuse/util/fusermount.c:1210:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt_long(argc, argv, "hVo:uzq", long_opts, data/mergerfs-2.31.0/libfuse/util/fusermount.c:1275:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. commfd = getenv(FUSE_COMMFD_ENV); data/mergerfs-2.31.0/libfuse/util/mount.mergerfs.c:222:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. } else if (!getenv("HOME")) { data/mergerfs-2.31.0/libfuse/util/mount_util.c:291:6: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(toresolv, buf) == NULL) { data/mergerfs-2.31.0/src/fs_realpath.hpp:31:3: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. realpath(const std::string &path_, data/mergerfs-2.31.0/src/fs_realpath.hpp:34:14: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. return ::realpath(path_.c_str(),resolved_path_); data/mergerfs-2.31.0/src/fs_realpath.hpp:40:3: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. realpath(const std::string &path_) data/mergerfs-2.31.0/src/fs_realpath.hpp:42:16: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. return fs::realpath(path_,NULL); data/mergerfs-2.31.0/src/fs_realpathize.cpp:33:18: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. rv = fs::realpath((*strs_)[i]); data/mergerfs-2.31.0/src/mergerfs.cpp:143:10: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. std::srand(time(NULL)); data/mergerfs-2.31.0/libfuse/include/fuse.h:166:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int (*open) (const char *, struct fuse_file_info *); data/mergerfs-2.31.0/libfuse/include/fuse.h:441:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. int (*utimens)(const char *, const struct timespec tv[2]); data/mergerfs-2.31.0/libfuse/include/fuse.h:829:47: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. int fuse_fs_utimens(struct fuse_fs *fs, const char *path, data/mergerfs-2.31.0/libfuse/include/fuse_lowlevel.h:428:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void (*open) (fuse_req_t req, fuse_ino_t ino, data/mergerfs-2.31.0/libfuse/include/kvec.h:68:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((v1).a, (v0).a, sizeof(type) * (v0).n); \ data/mergerfs-2.31.0/libfuse/lib/buffer.c:111:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/mergerfs-2.31.0/libfuse/lib/buffer.c:237:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dstmem, srcmem, len); data/mergerfs-2.31.0/libfuse/lib/fuse.c:172:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char inline_name[32]; data/mergerfs-2.31.0/libfuse/lib/fuse.c:1590:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (fs->op.open) { data/mergerfs-2.31.0/libfuse/lib/fuse.c:1597:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). err = fs->op.open(path,fi); data/mergerfs-2.31.0/libfuse/lib/fuse.c:1993:47: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. int fuse_fs_utimens(struct fuse_fs *fs, const char *path, data/mergerfs-2.31.0/libfuse/lib/fuse.c:2790:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linkname[PATH_MAX + 1]; data/mergerfs-2.31.0/libfuse/lib/fuse.c:3970:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out_buf, in_buf, in_bufsz); data/mergerfs-2.31.0/libfuse/lib/fuse.c:4325:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fs->op, op, op_size); data/mergerfs-2.31.0/libfuse/lib/fuse_dirents.c:258:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(d->name,dirent_->d_name,namelen_); data/mergerfs-2.31.0/libfuse/lib/fuse_dirents.c:292:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(d->dirent.name,dirent_->d_name,namelen_); data/mergerfs-2.31.0/libfuse/lib/fuse_dirents.c:328:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(d->name,dirent_->name,namelen_); data/mergerfs-2.31.0/libfuse/lib/fuse_dirents.c:362:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(d->dirent.name,dirent_->name,namelen_); data/mergerfs-2.31.0/libfuse/lib/fuse_loop_mt.c:112:54: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (stack_size && pthread_attr_setstacksize(&attr, atoi(stack_size))) data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:242:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(padded_iov + 1, iov, count * sizeof(struct iovec)); data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:367:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[sizeof(struct fuse_entry_out) + sizeof(struct fuse_open_out)]; data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:954:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&padded_iov[2], iov, count * sizeof(struct iovec)); data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1220:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (req->f->op.open) data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1221:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). req->f->op.open(req, nodeid, &fi); data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:2813:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&f->op, op, op_size); data/mergerfs-2.31.0/libfuse/lib/fuse_opt.c:264:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newarg, arg, sep); data/mergerfs-2.31.0/libfuse/lib/helper.c:107:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mountpoint[PATH_MAX]; data/mergerfs-2.31.0/libfuse/lib/helper.c:219:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). nullfd = open("/dev/null", O_RDWR, 0); data/mergerfs-2.31.0/libfuse/lib/helper.c:251:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/null", O_RDWR); data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c:150:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char device_path[SPECNAMELEN + 12]; data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c:151:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *argv[4]; data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c:178:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *ep, dev[128]; data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c:246:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(dev, O_RDWR)) < 0) { data/mergerfs-2.31.0/libfuse/lib/mount_bsd.c:282:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *argv[32]; data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:45:16: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. #define fork() vfork() data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:257:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1]; data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:372:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char env[10]; data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:373:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *argv[32]; data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:377:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open("/dev/null", O_RDONLY); data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:418:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[128]; data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:451:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(devname, O_RDWR); data/mergerfs-2.31.0/libfuse/lib/mount_util.c:250:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[PATH_MAX]; data/mergerfs-2.31.0/libfuse/lib/mount_util.c:350:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/mergerfs-2.31.0/libfuse/lib/mount_util.c:351:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen("/proc/filesystems", "r"); data/mergerfs-2.31.0/libfuse/util/fusermount.c:112:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). mtablock = open(mtab_lock, O_RDWR | O_CREAT, 0600); data/mergerfs-2.31.0/libfuse/util/fusermount.c:154:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char uidstr[32]; data/mergerfs-2.31.0/libfuse/util/fusermount.c:170:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. uidlen = sprintf(uidstr, "%u", getuid()); data/mergerfs-2.31.0/libfuse/util/fusermount.c:305:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[131072]; data/mergerfs-2.31.0/libfuse/util/fusermount.c:325:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *a[2] = { last, mnt }; data/mergerfs-2.31.0/libfuse/util/fusermount.c:354:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[65536]; data/mergerfs-2.31.0/libfuse/util/fusermount.c:543:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(FUSE_CONF, "r"); data/mergerfs-2.31.0/libfuse/util/fusermount.c:546:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[256]; data/mergerfs-2.31.0/libfuse/util/fusermount.c:798:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(d, s, len); data/mergerfs-2.31.0/libfuse/util/fusermount.c:813:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(d, "fd=%i,rootmode=%o,user_id=%u,group_id=%u", data/mergerfs-2.31.0/libfuse/util/fusermount.c:854:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(d, "fd=%i,rootmode=%o,user_id=%u", data/mergerfs-2.31.0/libfuse/util/fusermount.c:898:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). vf = fopen(version_file, "r"); data/mergerfs-2.31.0/libfuse/util/fusermount.c:964:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char procfile[256]; data/mergerfs-2.31.0/libfuse/util/fusermount.c:965:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). *mountpoint_fd = open(mnt, O_WRONLY); data/mergerfs-2.31.0/libfuse/util/fusermount.c:985:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(procfile, "/proc/self/fd/%i", *mountpoint_fd); data/mergerfs-2.31.0/libfuse/util/fusermount.c:1000:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(dev, O_RDWR); data/mergerfs-2.31.0/libfuse/util/fusermount.c:1286:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cfd = atoi(commfd); data/mergerfs-2.31.0/libfuse/util/fusermount.c:1313:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[16]; data/mergerfs-2.31.0/libfuse/util/mount_util.c:250:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[PATH_MAX]; data/mergerfs-2.31.0/libfuse/util/mount_util.c:350:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/mergerfs-2.31.0/libfuse/util/mount_util.c:351:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen("/proc/filesystems", "r"); data/mergerfs-2.31.0/src/config.cpp:134:40: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _map["func.open"] = &func.open; data/mergerfs-2.31.0/src/endian.hpp:28:31: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const union { uint32_t i; char c[4]; } u = { 0x01000000 }; data/mergerfs-2.31.0/src/fs_cow.cpp:113:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). src_fd = fs::open(src_fullpath_,O_RDONLY|O_NOFOLLOW); data/mergerfs-2.31.0/src/fs_futimesat.hpp:27:19: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *pathname, data/mergerfs-2.31.0/src/fs_mktemp.cpp:66:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fs::open(tmppath,flags,S_IWUSR); data/mergerfs-2.31.0/src/fs_movefile.cpp:93:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fdin = fs::open(fdin_path,O_RDONLY); data/mergerfs-2.31.0/src/fs_open.hpp:32:3: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const char *path_, data/mergerfs-2.31.0/src/fs_open.hpp:35:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return ::open(path_,flags_); data/mergerfs-2.31.0/src/fs_open.hpp:41:3: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const char *path_, data/mergerfs-2.31.0/src/fs_open.hpp:45:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return ::open(path_,flags_,mode_); data/mergerfs-2.31.0/src/fs_open.hpp:51:3: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const std::string &path_, data/mergerfs-2.31.0/src/fs_open.hpp:54:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return fs::open(path_.c_str(),flags_); data/mergerfs-2.31.0/src/fs_open.hpp:60:3: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const std::string &path_, data/mergerfs-2.31.0/src/fs_open.hpp:64:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return fs::open(path_.c_str(),flags_,mode_); data/mergerfs-2.31.0/src/fs_open.hpp:72:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return fs::open(path_,O_RDONLY|O_DIRECTORY); data/mergerfs-2.31.0/src/fs_statvfs.hpp:71:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fs::open(path_,O_RDONLY|O_NOFOLLOW|O_PATH); data/mergerfs-2.31.0/src/fs_utimensat_freebsd.hpp:32:19: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *pathname_, data/mergerfs-2.31.0/src/fs_utimensat_linux.hpp:32:19: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *pathname_, data/mergerfs-2.31.0/src/fs_xattr.cpp:331:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fs::open(path_,O_RDONLY|O_NONBLOCK); data/mergerfs-2.31.0/src/func_category.cpp:88:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). (&funcs_.open) data/mergerfs-2.31.0/src/funcs.hpp:36:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FuncOpen open; data/mergerfs-2.31.0/src/fuse_create.cpp:100:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return fs::open(fullpath_,flags_,mode_); data/mergerfs-2.31.0/src/fuse_getxattr.cpp:94:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf_,val.c_str(),len); data/mergerfs-2.31.0/src/fuse_getxattr.cpp:113:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(destbuf_,src_.data(),srcbufsize); data/mergerfs-2.31.0/src/fuse_ioctl.cpp:41:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef char IOCTL_BUF[4096]; data/mergerfs-2.31.0/src/fuse_ioctl.cpp:155:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fs::open(fullpath,O_RDONLY|O_NOATIME|O_NONBLOCK); data/mergerfs-2.31.0/src/fuse_ioctl.cpp:178:42: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return l::ioctl_dir_base(config.func.open.policy, data/mergerfs-2.31.0/src/fuse_ioctl.cpp:196:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data,s_.c_str(),s_.size()); data/mergerfs-2.31.0/src/fuse_ioctl.cpp:279:41: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return l::file_basepath(config.func.open.policy, data/mergerfs-2.31.0/src/fuse_ioctl.cpp:323:41: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return l::file_fullpath(config.func.open.policy, data/mergerfs-2.31.0/src/fuse_listxattr.cpp:53:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(list_,xattrs.c_str(),xattrs.size()); data/mergerfs-2.31.0/src/fuse_open.cpp:66:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). rv = fs::open(fullpath_,flags_); data/mergerfs-2.31.0/src/fuse_open.cpp:170:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fs::open(fullpath,flags_); data/mergerfs-2.31.0/src/fuse_open.cpp:183:3: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(Policy::Func::Search searchFunc_, data/mergerfs-2.31.0/src/fuse_open.cpp:206:3: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const char *fusepath_, data/mergerfs-2.31.0/src/fuse_open.cpp:218:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return l::open(config.func.open.policy, data/mergerfs-2.31.0/src/fuse_open.cpp:218:32: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return l::open(config.func.open.policy, data/mergerfs-2.31.0/src/fuse_open.hpp:24:3: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const char *fusepath, data/mergerfs-2.31.0/src/fuse_prepare_hide.cpp:35:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). rv = FUSE::open(fusepath_,&ffi); data/mergerfs-2.31.0/src/fuse_utimens.cpp:60:27: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *fusepath_, data/mergerfs-2.31.0/src/fuse_utimens.cpp:77:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *fusepath_, data/mergerfs-2.31.0/src/fuse_utimens.cpp:92:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *fusepath_, data/mergerfs-2.31.0/src/fuse_utimens.cpp:121:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. utimens(const char *fusepath_, data/mergerfs-2.31.0/src/fuse_utimens.hpp:24:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. utimens(const char *fusepath, data/mergerfs-2.31.0/src/gidcache.cpp:114:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/mergerfs-2.31.0/src/mergerfs.cpp:110:34: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ops_.open = FUSE::open; data/mergerfs-2.31.0/src/nonstd/optional.hpp:775:31: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef struct { unsigned char data[ sizeof(value_type) ]; } aligned_storage_t; data/mergerfs-2.31.0/src/num.cpp:115:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/mergerfs-2.31.0/src/num.cpp:118:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%lu",bytes_); data/mergerfs-2.31.0/src/num.cpp:120:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%luT",bytes_ / TB); data/mergerfs-2.31.0/src/num.cpp:122:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%luG",bytes_ / GB); data/mergerfs-2.31.0/src/num.cpp:124:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%luM",bytes_ / MB); data/mergerfs-2.31.0/src/num.cpp:126:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%luK",bytes_ / KB); data/mergerfs-2.31.0/src/num.cpp:128:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%lu",bytes_); data/mergerfs-2.31.0/src/option_parser.cpp:124:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). is.open(filepath_); data/mergerfs-2.31.0/src/to_string.cpp:36:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[24]; data/mergerfs-2.31.0/src/to_string.cpp:38:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%d",int_); data/mergerfs-2.31.0/src/to_string.cpp:46:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/mergerfs-2.31.0/src/to_string.cpp:48:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%llu",(unsigned long long)uint64_); data/mergerfs-2.31.0/src/wyhash.h:69:62: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. static inline uint64_t _wyr8(const uint8_t *p) { uint64_t v; memcpy(&v, p, 8); return v;} data/mergerfs-2.31.0/src/wyhash.h:70:62: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. static inline uint64_t _wyr4(const uint8_t *p) { unsigned v; memcpy(&v, p, 4); return v;} data/mergerfs-2.31.0/src/wyhash.h:72:62: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. static inline uint64_t _wyr8(const uint8_t *p) { uint64_t v; memcpy(&v, p, 8); return __builtin_bswap64(v);} data/mergerfs-2.31.0/src/wyhash.h:73:62: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. static inline uint64_t _wyr4(const uint8_t *p) { unsigned v; memcpy(&v, p, 4); return __builtin_bswap32(v);} data/mergerfs-2.31.0/src/wyhash.h:75:62: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. static inline uint64_t _wyr8(const uint8_t *p) { uint64_t v; memcpy(&v, p, 8); return _byteswap_uint64(v);} data/mergerfs-2.31.0/src/wyhash.h:76:62: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. static inline uint64_t _wyr4(const uint8_t *p) { unsigned v; memcpy(&v, p, 4); return _byteswap_ulong(v);} data/mergerfs-2.31.0/libfuse/include/fuse.h:179:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int (*read) (char *, size_t, off_t, data/mergerfs-2.31.0/libfuse/include/fuse.h:603:10: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode_t umask; data/mergerfs-2.31.0/libfuse/include/fuse_kernel.h:537:11: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). uint32_t umask; data/mergerfs-2.31.0/libfuse/include/fuse_kernel.h:543:11: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). uint32_t umask; data/mergerfs-2.31.0/libfuse/include/fuse_kernel.h:587:11: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). uint32_t umask; data/mergerfs-2.31.0/libfuse/include/fuse_lowlevel.h:120:8: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode_t umask; data/mergerfs-2.31.0/libfuse/include/fuse_lowlevel.h:456:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, data/mergerfs-2.31.0/libfuse/lib/buffer.c:85:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). res = read(src->fd, dst->mem + dst_off, len); data/mergerfs-2.31.0/libfuse/lib/fuse.c:59:17: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). unsigned int umask; data/mergerfs-2.31.0/libfuse/lib/fuse.c:721:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) < sizeof(node->inline_name)) { data/mergerfs-2.31.0/libfuse/lib/fuse.c:855:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(name); data/mergerfs-2.31.0/libfuse/lib/fuse.c:879:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, name, len); data/mergerfs-2.31.0/libfuse/lib/fuse.c:971:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(buf, "/"); data/mergerfs-2.31.0/libfuse/lib/fuse.c:1345:24: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (0777 & ~f->conf.umask); data/mergerfs-2.31.0/libfuse/lib/fuse.c:1625:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fs->op.read || fs->op.read_buf) { data/mergerfs-2.31.0/libfuse/lib/fuse.c:1653:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). res = fs->op.read(mem, size, off, fi); data/mergerfs-2.31.0/libfuse/lib/fuse.c:1879:35: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). fuse_get_context()->umask); data/mergerfs-2.31.0/libfuse/lib/fuse.c:2068:35: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). fuse_get_context()->umask); data/mergerfs-2.31.0/libfuse/lib/fuse.c:2082:47: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). path, mode, fuse_get_context()->umask); data/mergerfs-2.31.0/libfuse/lib/fuse.c:2395:23: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). c->ctx.umask = ctx->umask; data/mergerfs-2.31.0/libfuse/lib/fuse.c:2475:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(name); data/mergerfs-2.31.0/libfuse/lib/fuse.c:4222:34: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). FUSE_LIB_OPT("umask=%o", umask, 0), data/mergerfs-2.31.0/libfuse/lib/fuse.c:4444:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(root->inline_name, "/"); data/mergerfs-2.31.0/libfuse/lib/fuse_kern_chan.c:28:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). res = read(fuse_chan_fd(ch), buf, size); data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:259:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned namelen = strlen(name); data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:269:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dirent->name, name, namelen); data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:282:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). entsize = fuse_dirent_size(strlen(name)); data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:399:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return send_reply_ok(req, linkname, strlen(linkname)); data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:533:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). res = read(fd, buf, len); data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1115:27: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). req->ctx.umask = arg->umask; data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1130:27: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). req->ctx.umask = arg->umask; data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1161:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *linkname = ((char *) inarg) + strlen((char *) inarg) + 1; data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1173:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *newname = oldname + strlen(oldname) + 1; data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1203:29: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). req->ctx.umask = arg->umask; data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1230:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (req->f->op.read) { data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1239:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). req->f->op.read(req, nodeid, arg->size, arg->offset, &fi); data/mergerfs-2.31.0/libfuse/lib/fuse_lowlevel.c:1462:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *value = name + strlen(name) + 1; data/mergerfs-2.31.0/libfuse/lib/fuse_opt.c:117:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned oldlen = *opts ? strlen(*opts) : 0; data/mergerfs-2.31.0/libfuse/lib/fuse_opt.c:118:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *d = realloc(*opts, oldlen + 1 + strlen(opt) * 2 + 1); data/mergerfs-2.31.0/libfuse/lib/fuse_opt.c:173:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int arglen = strlen(arg); data/mergerfs-2.31.0/libfuse/lib/fuse_opt.c:260:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newarg = malloc(sep + strlen(param) + 1); data/mergerfs-2.31.0/libfuse/lib/helper.c:135:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). subtype_opt = (char *) malloc(strlen(basename) + 64); data/mergerfs-2.31.0/libfuse/lib/helper.c:208:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(waiter[0], &completed, sizeof(completed)); data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:468:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). source = malloc((mo->fsname ? strlen(mo->fsname) : 0) + data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:469:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (mo->subtype ? strlen(mo->subtype) : 0) + data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:470:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(devname) + 32); data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:472:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). type = malloc((mo->subtype ? strlen(mo->subtype) : 0) + 32); data/mergerfs-2.31.0/libfuse/lib/mount_generic.c:480:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(type, "."); data/mergerfs-2.31.0/libfuse/lib/mount_util.c:38:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(mnt, _PATH_MOUNTED, strlen(mnt)) == 0 && data/mergerfs-2.31.0/libfuse/lib/mount_util.c:39:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _PATH_MOUNTED[strlen(mnt)] == '/') data/mergerfs-2.31.0/libfuse/lib/mount_util.c:271:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (end = copy + strlen(copy) - 1; end > copy && *end == '/'; end --); data/mergerfs-2.31.0/libfuse/lib/mount_util.c:300:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dst = (char *) malloc(strlen(buf) + 1 + strlen(lastcomp) + 1); data/mergerfs-2.31.0/libfuse/lib/mount_util.c:300:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dst = (char *) malloc(strlen(buf) + 1 + strlen(lastcomp) + 1); data/mergerfs-2.31.0/libfuse/lib/mount_util.c:302:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned buflen = strlen(buf); data/mergerfs-2.31.0/libfuse/util/fusermount.c:520:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (s = line + strlen(line) - 1; data/mergerfs-2.31.0/libfuse/util/fusermount.c:525:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(line, s, strlen(s)+1); data/mergerfs-2.31.0/libfuse/util/fusermount.c:550:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (line[strlen(line)-1] == '\n') { data/mergerfs-2.31.0/libfuse/util/fusermount.c:556:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if(line[strlen(line)-1] == '\n') { data/mergerfs-2.31.0/libfuse/util/fusermount.c:577:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(s, beg, strlen(beg)) == 0) data/mergerfs-2.31.0/libfuse/util/fusermount.c:613:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(opt) == len && strncmp(opt, s, len) == 0) { data/mergerfs-2.31.0/libfuse/util/fusermount.c:634:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned oldsize = strlen(*optsp); data/mergerfs-2.31.0/libfuse/util/fusermount.c:635:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned newsize = oldsize + 1 + strlen(opt) + expand + 1; data/mergerfs-2.31.0/libfuse/util/fusermount.c:665:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(*mnt_optsp); data/mergerfs-2.31.0/libfuse/util/fusermount.c:673:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (add_option(mnt_optsp, "user=", strlen(user)) == -1) data/mergerfs-2.31.0/libfuse/util/fusermount.c:682:5: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(opt) == len && strncmp(s, opt, len) == 0) data/mergerfs-2.31.0/libfuse/util/fusermount.c:692:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned opt_len = strlen(opt); data/mergerfs-2.31.0/libfuse/util/fusermount.c:732:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). optbuf = (char *) malloc(strlen(opts) + 128); data/mergerfs-2.31.0/libfuse/util/fusermount.c:820:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). source = malloc((fsname ? strlen(fsname) : 0) + data/mergerfs-2.31.0/libfuse/util/fusermount.c:821:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (subtype ? strlen(subtype) : 0) + strlen(dev) + 32); data/mergerfs-2.31.0/libfuse/util/fusermount.c:821:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (subtype ? strlen(subtype) : 0) + strlen(dev) + 32); data/mergerfs-2.31.0/libfuse/util/fusermount.c:823:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). type = malloc((subtype ? strlen(subtype) : 0) + 32); data/mergerfs-2.31.0/libfuse/util/fusermount.c:1271:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(033); data/mergerfs-2.31.0/libfuse/util/mount.mergerfs.c:39:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t optlen = strlen(opt); data/mergerfs-2.31.0/libfuse/util/mount.mergerfs.c:40:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t cmdlen = *cmdp ? strlen(*cmdp) : 0; data/mergerfs-2.31.0/libfuse/util/mount.mergerfs.c:64:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int oldlen = options ? strlen(options) : 0; data/mergerfs-2.31.0/libfuse/util/mount.mergerfs.c:66:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). options = xrealloc(options, oldlen + 1 + strlen(opt) + 1); data/mergerfs-2.31.0/libfuse/util/mount.mergerfs.c:70:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(options, ","); data/mergerfs-2.31.0/libfuse/util/mount_util.c:38:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(mnt, _PATH_MOUNTED, strlen(mnt)) == 0 && data/mergerfs-2.31.0/libfuse/util/mount_util.c:39:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _PATH_MOUNTED[strlen(mnt)] == '/') data/mergerfs-2.31.0/libfuse/util/mount_util.c:271:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (end = copy + strlen(copy) - 1; end > copy && *end == '/'; end --); data/mergerfs-2.31.0/libfuse/util/mount_util.c:300:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dst = (char *) malloc(strlen(buf) + 1 + strlen(lastcomp) + 1); data/mergerfs-2.31.0/libfuse/util/mount_util.c:300:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dst = (char *) malloc(strlen(buf) + 1 + strlen(lastcomp) + 1); data/mergerfs-2.31.0/libfuse/util/mount_util.c:302:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned buflen = strlen(buf); data/mergerfs-2.31.0/src/fs_copydata_readwrite.cpp:76:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nr = fs::read(src_fd_,&buf[0],bufsize); data/mergerfs-2.31.0/src/fs_inode.cpp:221:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). calc(fusepath_,strlen(fusepath_),st_); data/mergerfs-2.31.0/src/fs_read.hpp:28:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(const int fd_, data/mergerfs-2.31.0/src/fs_read.hpp:32:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return ::read(fd_,buf_,count_); data/mergerfs-2.31.0/src/fuse_create.cpp:187:26: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). fc->umask, data/mergerfs-2.31.0/src/fuse_mkdir.cpp:162:25: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). fc->umask); data/mergerfs-2.31.0/src/fuse_mknod.cpp:163:25: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). fc->umask, data/mergerfs-2.31.0/src/fuse_read.cpp:65:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(char *buf_, data/mergerfs-2.31.0/src/fuse_read.hpp:24:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(char *buf, data/mergerfs-2.31.0/src/fuse_readdir_linux.cpp:99:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). namelen = strlen(d->name); data/mergerfs-2.31.0/src/fuse_readdir_plus_linux.cpp:107:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). namelen = (strlen(d->name) + 1); data/mergerfs-2.31.0/src/fuse_readdir_plus_posix.cpp:55:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(d_->d_name); data/mergerfs-2.31.0/src/fuse_readdir_posix.cpp:54:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(d_->d_name); data/mergerfs-2.31.0/src/fuse_readlink.cpp:69:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf_,fullpath_.c_str(),size_); data/mergerfs-2.31.0/src/hashset.hpp:63:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return put(str_,strlen(str_)); data/mergerfs-2.31.0/src/mergerfs.cpp:114:63: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ops_.read = (nullrw_ ? FUSE::read_null : FUSE::read); data/mergerfs-2.31.0/src/resources.cpp:28:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0); data/mergerfs-2.31.0/src/str.cpp:203:17: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. return std::equal(suffix_.rbegin(), ANALYSIS SUMMARY: Hits = 363 Lines analyzed = 43182 in approximately 1.15 seconds (37443 lines/second) Physical Source Lines of Code (SLOC) = 28344 Hits@level = [0] 257 [1] 101 [2] 130 [3] 17 [4] 72 [5] 43 Hits@level+ = [0+] 620 [1+] 363 [2+] 262 [3+] 132 [4+] 115 [5+] 43 Hits/KSLOC@level+ = [0+] 21.8741 [1+] 12.8069 [2+] 9.24358 [3+] 4.65707 [4+] 4.0573 [5+] 1.51708 Dot directories skipped = 2 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.