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/vdens-0.2/vdens.c

FINAL RESULTS:

data/vdens-0.2/vdens.c:342:4:  [4] (shell) execvp:
  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.
			execvp(cmdargv[0], cmdargv);
data/vdens-0.2/vdens.c:352:7:  [4] (shell) execvp:
  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.
						execvp(cmdargv[0], cmdargv);
data/vdens-0.2/vdens.c:374:13:  [4] (shell) execvp:
  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.
            execvp(cmdargv[0], cmdargv);
data/vdens-0.2/vdens.c:393:7:  [4] (shell) execvp:
  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.
						execvp(cmdargv[0], cmdargv);
data/vdens-0.2/vdens.c:426:20:  [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 *argvsh[] = {getenv("SHELL"),NULL};
data/vdens-0.2/vdens.c:444:15:  [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.
	resolvconf = getenv("VDE_RESOLVCONF");
data/vdens-0.2/vdens.c:445:15:  [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.
	resolvaddr = getenv("VDE_RESOLVADDR");
data/vdens-0.2/vdens.c:449:12:  [3] (buffer) getopt_long:
  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.
		if ((c = getopt_long(argc, argv, short_options, long_options, NULL)) == -1)
data/vdens-0.2/vdens.c:99:2:  [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 map_file[PATH_MAX];
data/vdens-0.2/vdens.c:104:6:  [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).
	f = fopen(map_file, "w");
data/vdens-0.2/vdens.c:110:6:  [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).
	f = fopen(map_file, "w");
data/vdens-0.2/vdens.c:116:6:  [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).
	f = fopen(map_file, "w");
data/vdens-0.2/vdens.c:176:2:  [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[1];
data/vdens-0.2/vdens.c:187:2:  [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 child_stack[STACK_SIZE];
data/vdens-0.2/vdens.c:217:11:  [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((fd = open("/dev/net/tun", O_RDWR | O_CLOEXEC)) < 0)
data/vdens-0.2/vdens.c:231:3:  [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[VDE_ETHBUFSIZE];
data/vdens-0.2/vdens.c:275:11:  [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.
	unsigned char buf[VDE_ETHBUFSIZE];
data/vdens-0.2/vdens.c:302:11:  [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 (CWE-377).
	int fd = mkstemp(tmpname);
data/vdens-0.2/vdens.c:151:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			rwlen = read(pipe_fd[0], &unshare_rv, sizeof(unshare_rv));
data/vdens-0.2/vdens.c:179:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read(pipe_fd[0], buf, 1) != 0)
data/vdens-0.2/vdens.c:252:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				n = read(tapfd[i], buf, VDE_ETHBUFSIZE);
data/vdens-0.2/vdens.c:285:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			n = read(tapfd, buf, VDE_ETHBUFSIZE);
data/vdens-0.2/vdens.c:290:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			n = read(streamfd[0], buf, VDE_ETHBUFSIZE);

ANALYSIS SUMMARY:

Hits = 23
Lines analyzed = 546 in approximately 0.03 seconds (16368 lines/second)
Physical Source Lines of Code (SLOC) = 488
Hits@level = [0]   9 [1]   5 [2]  10 [3]   4 [4]   4 [5]   0
Hits@level+ = [0+]  32 [1+]  23 [2+]  18 [3+]   8 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 65.5738 [1+] 47.1311 [2+] 36.8852 [3+] 16.3934 [4+] 8.19672 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
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.