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/ksmtuned-4.20150326/ksmctl.c

FINAL RESULTS:

data/ksmtuned-4.20150326/ksmctl.c:55:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(KSM_MAX_KERNEL_PAGES_FILE, R_OK) >= 0)
data/ksmtuned-4.20150326/ksmctl.c:40:14:  [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 (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *var = getenv("KSM_MAX_KERNEL_PAGES");
data/ksmtuned-4.20150326/ksmctl.c:29:13:  [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 (!(fp = fopen(filename, "w")) ||

ANALYSIS SUMMARY:

Hits = 3
Lines analyzed = 77 in approximately 0.03 seconds (2275 lines/second)
Physical Source Lines of Code (SLOC) = 59
Hits@level = [0]   2 [1]   0 [2]   1 [3]   1 [4]   1 [5]   0
Hits@level+ = [0+]   5 [1+]   3 [2+]   3 [3+]   2 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 84.7458 [1+] 50.8475 [2+] 50.8475 [3+] 33.8983 [4+] 16.9492 [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.