COMMAND : flawfinder -SQ Flawfinder version 1.27, (C) 2001-2004 David A. Wheeler. Number of dangerous functions in C/C++ ruleset: 160 /tmp/bogosec.temp_target.1iABuM/src/zomne.c:45: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited. Use a constant for the format specification. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:61: [4] (buffer) sprintf: Does not check for buffer overflows. Use snprintf or vsnprintf. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:82: [4] (buffer) sprintf: Does not check for buffer overflows. Use snprintf or vsnprintf. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:108: [4] (buffer) sprintf: Does not check for buffer overflows. Use snprintf or vsnprintf. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:109: [4] (shell) system: This causes a new program to execute and is difficult to use safely. try using a library call that implements the same functionality if available. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:138: [4] (buffer) sprintf: Does not check for buffer overflows. Use snprintf or vsnprintf. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:155: [4] (buffer) sprintf: Does not check for buffer overflows. Use snprintf or vsnprintf. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:169: [4] (buffer) sprintf: Does not check for buffer overflows. Use snprintf or vsnprintf. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:172: [4] (buffer) sprintf: Does not check for buffer overflows. Use snprintf or vsnprintf. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:129: [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. Check environment variables carefully before using them. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:19: [2] (buffer) char: Statically-sized arrays can be overflowed. Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:51: [2] (buffer) char: Statically-sized arrays can be overflowed. Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:58: [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?. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:72: [2] (buffer) char: Statically-sized arrays can be overflowed. Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:73: [2] (buffer) char: Statically-sized arrays can be overflowed. Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:74: [2] (buffer) char: Statically-sized arrays can be overflowed. Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:83: [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?. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:103: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination. Consider using strncpy or strlcpy (warning, strncpy is easily misused). Risk is low because the source is a constant string. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:122: [2] (buffer) char: Statically-sized arrays can be overflowed. Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:123: [2] (buffer) char: Statically-sized arrays can be overflowed. Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:124: [2] (buffer) char: Statically-sized arrays can be overflowed. Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:162: [2] (buffer) sprintf: Does not check for buffer overflows. Use snprintf or vsnprintf. Risk is low because the source has a constant maximum length. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:170: [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. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:18: [1] (buffer) read: Check buffer boundaries if used in a loop. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:27: [1] (buffer) read: Check buffer boundaries if used in a loop. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:31: [1] (buffer) read: Check buffer boundaries if used in a loop. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:32: [1] (buffer) read: Check buffer boundaries if used in a loop. /tmp/bogosec.temp_target.1iABuM/src/zomne.c:162: [1] (buffer) strlen: Does not handle strings that are not \0-terminated (it could cause a crash if unprotected). /tmp/bogosec.temp_target.1iABuM/src/zomne.c:163: [1] (buffer) strlen: Does not handle strings that are not \0-terminated (it could cause a crash if unprotected). /tmp/bogosec.temp_target.1iABuM/src/zomne.c:164: [1] (buffer) strlen: Does not handle strings that are not \0-terminated (it could cause a crash if unprotected). /tmp/bogosec.temp_target.1iABuM/src/zomne.c:165: [1] (buffer) strlen: Does not handle strings that are not \0-terminated (it could cause a crash if unprotected). /tmp/bogosec.temp_target.1iABuM/src/zomne.c:173: [1] (buffer) strlen: Does not handle strings that are not \0-terminated (it could cause a crash if unprotected). /tmp/bogosec.temp_target.1iABuM/src/zomne.c:173: [1] (buffer) strlen: Does not handle strings that are not \0-terminated (it could cause a crash if unprotected). /tmp/bogosec.temp_target.1iABuM/src/zomne.c:176: [1] (buffer) strlen: Does not handle strings that are not \0-terminated (it could cause a crash if unprotected). Hits = 34 Lines analyzed = 183 in 0.53 seconds (5288 lines/second) Physical Source Lines of Code (SLOC) = 136 Hits@level = [0] 0 [1] 11 [2] 13 [3] 1 [4] 9 [5] 0 Hits@level+ = [0+] 34 [1+] 34 [2+] 23 [3+] 10 [4+] 9 [5+] 0 Hits/KSLOC@level+ = [0+] 250 [1+] 250 [2+] 169.118 [3+] 73.5294 [4+] 66.1765 [5+] 0 Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code!