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/etbemon-1.3.4/bin/btrfs.helper.cpp Examining data/etbemon-1.3.4/bin/zfs.helper.cpp Examining data/etbemon-1.3.4/mon-local.d/deleted-mapped.monitor.cpp Examining data/etbemon-1.3.4/mon.d/dialin.monitor.wrap.c Examining data/etbemon-1.3.4/mon.d/rpc.monitor.c Examining data/etbemon-1.3.4/muxpect/io.c Examining data/etbemon-1.3.4/muxpect/muxpect.c Examining data/etbemon-1.3.4/muxpect/muxpect.h Examining data/etbemon-1.3.4/muxpect/setup.c FINAL RESULTS: data/etbemon-1.3.4/bin/btrfs.helper.cpp:36:5: [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(child_args[0], child_args); data/etbemon-1.3.4/bin/btrfs.helper.cpp:64:5: [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(child_args[0], child_args); data/etbemon-1.3.4/bin/zfs.helper.cpp:14: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(child_args[0], child_args); data/etbemon-1.3.4/mon-local.d/deleted-mapped.monitor.cpp:9: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(child_args[0], child_args); data/etbemon-1.3.4/mon.d/dialin.monitor.wrap.c:28:12: [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. return execv (real_img, argv); data/etbemon-1.3.4/mon.d/rpc.monitor.c:108:17: [3] (buffer) getopt: 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 ((c = getopt(argc, argv, "t:avhp:r:")) != EOF) { data/etbemon-1.3.4/muxpect/muxpect.c:54:17: [3] (buffer) getopt: 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 ((c = getopt (argc, argv, "dhf:p:")) != EOF) data/etbemon-1.3.4/mon.d/rpc.monitor.c:111:13: [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). timeout = atoi(optarg); data/etbemon-1.3.4/mon.d/rpc.monitor.c:287: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 failtext[80]; data/etbemon-1.3.4/mon.d/rpc.monitor.c:409:9: [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). return(atoi(program)); data/etbemon-1.3.4/mon.d/rpc.monitor.c:423:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(hp->h_addr, (char *)&addr->sin_addr, hp->h_length); data/etbemon-1.3.4/muxpect/muxpect.c:43: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 fname[200], errbuf[100]; data/etbemon-1.3.4/muxpect/muxpect.h:28: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 expect[BUFSIZ]; data/etbemon-1.3.4/muxpect/muxpect.h:29: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 send[BUFSIZ]; data/etbemon-1.3.4/muxpect/muxpect.h:38: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 hostname[80]; data/etbemon-1.3.4/muxpect/muxpect.h:42: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[8192]; data/etbemon-1.3.4/muxpect/muxpect.h: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 re_errbuf[100]; data/etbemon-1.3.4/muxpect/muxpect.h:48: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 summ[80]; data/etbemon-1.3.4/muxpect/muxpect.h:49: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 detail[8192]; data/etbemon-1.3.4/muxpect/setup.c:42: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[BUFSIZ]; data/etbemon-1.3.4/muxpect/setup.c:47:14: [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). if ((f = fopen (file, "r")) == NULL) data/etbemon-1.3.4/muxpect/setup.c:197: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 (&n->saddr.sin_addr, hent->h_addr_list[0], hent->h_length); data/etbemon-1.3.4/mon.d/rpc.monitor.c:187: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). if (reason[strlen(reason) - 1] == '\n') { data/etbemon-1.3.4/mon.d/rpc.monitor.c:188: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). reason[strlen(reason) - 1] = '\0'; data/etbemon-1.3.4/muxpect/muxpect.c:64:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (fname, optarg, sizeof(fname)); data/etbemon-1.3.4/muxpect/setup.c:64: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). buf[strlen (buf) -1] = '\0'; data/etbemon-1.3.4/muxpect/setup.c:67:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (cur->expect, buf, BUFSIZ); data/etbemon-1.3.4/muxpect/setup.c:72:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (cur->send, buf, BUFSIZ); data/etbemon-1.3.4/muxpect/setup.c:161:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (errbuf, "could not alloc memory", errbufsiz); data/etbemon-1.3.4/muxpect/setup.c:172:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (n->hostname, hosts[i], sizeof (n->hostname)); ANALYSIS SUMMARY: Hits = 30 Lines analyzed = 1177 in approximately 0.11 seconds (10438 lines/second) Physical Source Lines of Code (SLOC) = 867 Hits@level = [0] 59 [1] 8 [2] 15 [3] 2 [4] 5 [5] 0 Hits@level+ = [0+] 89 [1+] 30 [2+] 22 [3+] 7 [4+] 5 [5+] 0 Hits/KSLOC@level+ = [0+] 102.653 [1+] 34.6021 [2+] 25.3749 [3+] 8.07382 [4+] 5.76701 [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.