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/efingerd-1.6.5/define.h Examining data/efingerd-1.6.5/child.c Examining data/efingerd-1.6.5/efingerd.c Examining data/efingerd-1.6.5/efingerd.h FINAL RESULTS: data/efingerd-1.6.5/child.c:117: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(cmd, cmd, arg1, arg2, arg3, NULL); data/efingerd-1.6.5/child.c:158: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(path, EFINGER_USER_FILE); data/efingerd-1.6.5/child.c:64: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. static char addr[256]; data/efingerd-1.6.5/child.c:132: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 buff[200], path[200]; data/efingerd-1.6.5/child.c:182: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 buffer[MAX_SOCK_LENGTH]; data/efingerd-1.6.5/efingerd.c:125:24: [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). client_timeout = atoi ( argv[i]); data/efingerd-1.6.5/child.c:71:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr, inet_ntoa(in), sizeof(addr)); data/efingerd-1.6.5/child.c:73:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr, he->h_name, sizeof(addr)); data/efingerd-1.6.5/child.c:75:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr, inet_ntoa(in), sizeof(addr)); data/efingerd-1.6.5/child.c:135:9: [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(user) == 0) { data/efingerd-1.6.5/child.c:145:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, passs->pw_gecos, sizeof(buff) - 1); data/efingerd-1.6.5/child.c:155:3: [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(passs->pw_dir) + sizeof(EFINGER_USER_FILE) + 1) { data/efingerd-1.6.5/child.c:156:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path, passs->pw_dir, sizeof(path)); data/efingerd-1.6.5/child.c:157:17: [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(path, "/"); data/efingerd-1.6.5/efingerd.c:41:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read (d, &ch, 1) != 1) data/efingerd-1.6.5/efingerd.c:47:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (d, &ch, 1); /* should read the following \n */ data/efingerd-1.6.5/efingerd.c:67: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). write (sd, outcome, strlen (outcome)); ANALYSIS SUMMARY: Hits = 17 Lines analyzed = 493 in approximately 0.06 seconds (8089 lines/second) Physical Source Lines of Code (SLOC) = 298 Hits@level = [0] 4 [1] 11 [2] 4 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 21 [1+] 17 [2+] 6 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 70.4698 [1+] 57.047 [2+] 20.1342 [3+] 6.71141 [4+] 6.71141 [5+] 0 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.