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/proftpd-mod-tar-0.4/mod_tar.c FINAL RESULTS: data/proftpd-mod-tar-0.4/mod_tar.c:172: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. i = readlink(real_name, path, sizeof(path)-1); data/proftpd-mod-tar-0.4/mod_tar.c:170: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 path[PR_TUNABLE_PATH_MAX+1]; data/proftpd-mod-tar-0.4/mod_tar.c:223: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 real_path[PR_TUNABLE_PATH_MAX+1]; data/proftpd-mod-tar-0.4/mod_tar.c:224: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 save_path[PR_TUNABLE_PATH_MAX+1]; data/proftpd-mod-tar-0.4/mod_tar.c:926:10: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(tar_file); data/proftpd-mod-tar-0.4/mod_tar.c:801: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). chroot_len = strlen(session.chroot_path); data/proftpd-mod-tar-0.4/mod_tar.c:846: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). path_len = strlen(path); ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 1135 in approximately 0.03 seconds (34967 lines/second) Physical Source Lines of Code (SLOC) = 792 Hits@level = [0] 2 [1] 2 [2] 4 [3] 0 [4] 0 [5] 1 Hits@level+ = [0+] 9 [1+] 7 [2+] 5 [3+] 1 [4+] 1 [5+] 1 Hits/KSLOC@level+ = [0+] 11.3636 [1+] 8.83838 [2+] 6.31313 [3+] 1.26263 [4+] 1.26263 [5+] 1.26263 Dot directories skipped = 1 (--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.