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/libvdestack-0.1.0/vdestack.c
Examining data/libvdestack-0.1.0/vdestack.h

FINAL RESULTS:

data/libvdestack-0.1.0/vdestack.c:197:6:  [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(cmd.argv[0],cmd.argv);
data/libvdestack-0.1.0/vdestack.c:142: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/libvdestack-0.1.0/vdestack.c:155: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/libvdestack-0.1.0/vdestack.c:160: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/libvdestack-0.1.0/vdestack.c:166: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/libvdestack-0.1.0/vdestack.c:172: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/libvdestack-0.1.0/vdestack.c:247: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[VDE_ETHBUFSIZE];
data/libvdestack-0.1.0/vdestack.c:281: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/libvdestack-0.1.0/vdestack.c:146:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name) - 1);
data/libvdestack-0.1.0/vdestack.c:185:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((n = read(stack->cmdpipe[DAEMONSIDE], &cmd, sizeof(cmd))) > 0) {
data/libvdestack-0.1.0/vdestack.c:209:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(stack->sfd, &fdsi, sizeof(struct signalfd_siginfo)) == sizeof(fdsi)) {
data/libvdestack-0.1.0/vdestack.c:257: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/libvdestack-0.1.0/vdestack.c:292: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/libvdestack-0.1.0/vdestack.c:297: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);
data/libvdestack-0.1.0/vdestack.c:353:23:  [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).
	size_t ifnameoklen = strlen(ifnameok);
data/libvdestack-0.1.0/vdestack.c:365:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(stack->ifname, ifnameok, ifnameoklen + 1);
data/libvdestack-0.1.0/vdestack.c:418:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			read(stack->cmdpipe[APPSIDE], &reply, sizeof(reply)) < 0)
data/libvdestack-0.1.0/vdestack.c:434:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			read(stack->cmdpipe[APPSIDE], &reply, sizeof(reply)) < 0)

ANALYSIS SUMMARY:

Hits = 18
Lines analyzed = 456 in approximately 0.04 seconds (12448 lines/second)
Physical Source Lines of Code (SLOC) = 373
Hits@level = [0]   6 [1]  10 [2]   7 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  24 [1+]  18 [2+]   8 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 64.3432 [1+] 48.2574 [2+] 21.4477 [3+] 2.68097 [4+] 2.68097 [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.