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/longrun-0.9/longrun.c FINAL RESULTS: data/longrun-0.9/longrun.c:128:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, arg_ptr); data/longrun-0.9/longrun.c:139:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, arg_ptr); data/longrun-0.9/longrun.c:541:14: [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 ((g = getopt(argc, argv, "c:f:m:hlpstv")) != EOF) { data/longrun-0.9/longrun.c:150:7: [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). nb = open(LR_NORTHBRIDGE, O_RDONLY); data/longrun-0.9/longrun.c:169:7: [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). nb = open(LR_NORTHBRIDGE, O_RDWR); data/longrun-0.9/longrun.c:589: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 ((cpuid_fd = open(cpuid_device, O_RDWR)) < 0) { data/longrun-0.9/longrun.c:597: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). if ((msr_fd = open(msr_device, O_RDWR)) < 0) { ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 628 in approximately 0.03 seconds (20961 lines/second) Physical Source Lines of Code (SLOC) = 466 Hits@level = [0] 39 [1] 0 [2] 4 [3] 1 [4] 2 [5] 0 Hits@level+ = [0+] 46 [1+] 7 [2+] 7 [3+] 3 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 98.7124 [1+] 15.0215 [2+] 15.0215 [3+] 6.43777 [4+] 4.29185 [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.