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/gvpe-3.1/libev/ev.c Examining data/gvpe-3.1/libev/ev.h Examining data/gvpe-3.1/libev/ev++.h Examining data/gvpe-3.1/libev/ev_epoll.c Examining data/gvpe-3.1/libev/ev_kqueue.c Examining data/gvpe-3.1/libev/ev_poll.c Examining data/gvpe-3.1/libev/ev_select.c Examining data/gvpe-3.1/libev/ev_vars.h Examining data/gvpe-3.1/libev/ev_win32.c Examining data/gvpe-3.1/libev/ev_wrap.h Examining data/gvpe-3.1/lib/pidfile.h Examining data/gvpe-3.1/lib/dropin.h Examining data/gvpe-3.1/lib/gettext.h Examining data/gvpe-3.1/lib/alloca.c Examining data/gvpe-3.1/lib/pidfile.c Examining data/gvpe-3.1/lib/getopt1.c Examining data/gvpe-3.1/lib/dropin.c Examining data/gvpe-3.1/src/lzf/lzf.h Examining data/gvpe-3.1/src/lzf/lzfP.h Examining data/gvpe-3.1/src/lzf/lzf_c.c Examining data/gvpe-3.1/src/lzf/lzf_d.c Examining data/gvpe-3.1/src/tincd/bsd/device.c Examining data/gvpe-3.1/src/tincd/cygwin/device.c Examining data/gvpe-3.1/src/tincd/darwin/device.c Examining data/gvpe-3.1/src/tincd/freebsd/device.c Examining data/gvpe-3.1/src/tincd/linux/device.c Examining data/gvpe-3.1/src/tincd/mingw/common.h Examining data/gvpe-3.1/src/tincd/mingw/device.c Examining data/gvpe-3.1/src/tincd/netbsd/device.c Examining data/gvpe-3.1/src/tincd/openbsd/device.c Examining data/gvpe-3.1/src/tincd/raw_socket/device.c Examining data/gvpe-3.1/src/tincd/solaris/device.c Examining data/gvpe-3.1/src/tincd/uml_socket/device.c Examining data/gvpe-3.1/src/gvpe.C Examining data/gvpe-3.1/src/vpn.h Examining data/gvpe-3.1/src/vpn.C Examining data/gvpe-3.1/src/vpn_tcp.C Examining data/gvpe-3.1/src/vpn_dns.C Examining data/gvpe-3.1/src/sockinfo.h Examining data/gvpe-3.1/src/sockinfo.C Examining data/gvpe-3.1/src/curve25519.h Examining data/gvpe-3.1/src/curve25519.C Examining data/gvpe-3.1/src/iv_gen.h Examining data/gvpe-3.1/src/iv_gen.C Examining data/gvpe-3.1/src/hkdf.h Examining data/gvpe-3.1/src/hkdf.C Examining data/gvpe-3.1/src/connection.h Examining data/gvpe-3.1/src/connection.C Examining data/gvpe-3.1/src/callback.h Examining data/gvpe-3.1/src/device.h Examining data/gvpe-3.1/src/device.C Examining data/gvpe-3.1/src/global.h Examining data/gvpe-3.1/src/conf.h Examining data/gvpe-3.1/src/conf.C Examining data/gvpe-3.1/src/util.h Examining data/gvpe-3.1/src/util.C Examining data/gvpe-3.1/src/slog.h Examining data/gvpe-3.1/src/slog.C Examining data/gvpe-3.1/src/netcompat.h Examining data/gvpe-3.1/src/ev_cpp.h Examining data/gvpe-3.1/src/ev_cpp.C Examining data/gvpe-3.1/src/crypto.h Examining data/gvpe-3.1/src/crypto.C Examining data/gvpe-3.1/src/gvpectrl.C Examining data/gvpe-3.1/src/device-linux.C Examining data/gvpe-3.1/src/device-cygwin.C Examining data/gvpe-3.1/src/device-tincd.C Examining data/gvpe-3.1/src/device-darwin.C Examining data/gvpe-3.1/src/ether_emu.C Examining data/gvpe-3.1/src/curve25519-donna.c Examining data/gvpe-3.1/src/curve25519-donna-c64.c FINAL RESULTS: data/gvpe-3.1/lib/dropin.c:143:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. status = vsnprintf(*buf, len, fmt, ap); data/gvpe-3.1/lib/dropin.c:152:12: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. status = vsnprintf(*buf, len, fmt, ap); data/gvpe-3.1/libev/ev.c:4301:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (path, w->path); data/gvpe-3.1/src/device-cygwin.C:200:7: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (tapname, sizeof (tapname), USERMODEDEVICEDIR "%s" TAPSUFFIX, adapterid); data/gvpe-3.1/src/device-cygwin.C:222:7: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (tapname, sizeof (tapname), USERMODEDEVICEDIR "%s" TAPSUFFIX, adapterid); data/gvpe-3.1/src/device-cygwin.C:236:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (ifrname, (char *)tapname); data/gvpe-3.1/src/device-darwin.C:78:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (ifrname, rindex(device, '/') ? rindex(device, '/') + 1 : device); data/gvpe-3.1/src/device-tincd.C:182:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (ifrname, iface); data/gvpe-3.1/src/slog.C:82:7: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf (msg, 2048, m, ap); data/gvpe-3.1/src/sockinfo.C:136:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (hostport, "%s/%.15s:%d", strprotocol (prot), inet_ntoa (ia), ntohs (port) & 0xffff); data/gvpe-3.1/src/tincd/cygwin/device.c:102:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(tapname, sizeof(tapname), USERMODEDEVICEDIR "%s" TAPSUFFIX, adapterid); data/gvpe-3.1/src/tincd/cygwin/device.c:124:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(tapname, sizeof(tapname), USERMODEDEVICEDIR "%s" TAPSUFFIX, device); data/gvpe-3.1/src/tincd/mingw/device.c:180:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(tapname, sizeof(tapname), USERMODEDEVICEDIR "%s" TAPSUFFIX, adapterid); data/gvpe-3.1/src/tincd/mingw/device.c:204:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(tapname, sizeof(tapname), USERMODEDEVICEDIR "%s" TAPSUFFIX, device); data/gvpe-3.1/src/util.C:171:7: [4] (shell) execl: 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. execl ("/bin/sh", "/bin/sh", "-c", cb (), (char *) 0); data/gvpe-3.1/lib/getopt1.c:70:1: [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. getopt_long (argc, argv, options, long_options, opt_index) data/gvpe-3.1/lib/getopt1.c:126:11: [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. c = getopt_long (argc, argv, "abc:d:0123456789", data/gvpe-3.1/libev/ev.c:2884: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. && getenv ("LIBEV_FLAGS")) data/gvpe-3.1/libev/ev.c:2885:23: [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. flags = atoi (getenv ("LIBEV_FLAGS")); data/gvpe-3.1/src/gvpe.C:119:15: [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. while ((r = getopt_long (argc, argv, "c:DLl:", long_options, &option_index)) != EOF) data/gvpe-3.1/src/gvpectrl.C:129:15: [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. while ((r = getopt_long (argc, argv, "c:k::qg:Gs", long_options, &option_index)) != EOF) data/gvpe-3.1/src/vpn.C:427:16: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). if (!tmpnam (dir)) data/gvpe-3.1/src/vpn.C:457:11: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (chroot (".")) data/gvpe-3.1/lib/alloca.c:146: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 align[ALIGN_SIZE]; /* To force sizeof(header). */ data/gvpe-3.1/lib/dropin.c:81:8: [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). fd = open("/dev/null", O_RDWR); data/gvpe-3.1/lib/pidfile.c:51:11: [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 (!(f=fopen(pidfile,"r"))) data/gvpe-3.1/lib/pidfile.c:96:15: [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(pidfile, O_RDWR|O_CREAT, 0644)) == -1) data/gvpe-3.1/libev/ev.c:468: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 pad[128 - sizeof (uint32_t)]; data/gvpe-3.1/libev/ev.c:1354:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&r, &x, 4); data/gvpe-3.1/libev/ev.c:1394:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&r, &x, 4); data/gvpe-3.1/libev/ev.c:1424:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&r, &x, 8); data/gvpe-3.1/libev/ev.c:1464:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&r, &x, 8); data/gvpe-3.1/libev/ev.c:2510: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. char dummy[4]; data/gvpe-3.1/libev/ev.c:2885:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). flags = atoi (getenv ("LIBEV_FLAGS")); data/gvpe-3.1/libev/ev.c:4300: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. char path [4096]; data/gvpe-3.1/libev/ev.c:4382: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 [EV_INOTIFY_BUFSIZE]; data/gvpe-3.1/libev/ev.c:5072:34: [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. cb (EV_A_ EV_STAT, ((char *)ANHE_w (timers [i])) - offsetof (struct ev_stat, timer)); data/gvpe-3.1/libev/ev_select.c:155:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (vec_ro, vec_ri, fd_setsize); data/gvpe-3.1/libev/ev_select.c:156:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (vec_wo, vec_wi, fd_setsize); data/gvpe-3.1/libev/ev_select.c:164:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (vec_eo, vec_wi, fd_setsize); data/gvpe-3.1/src/conf.C:294:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.ip_proto = atoi (val); data/gvpe-3.1/src/conf.C:298:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.icmp_type = atoi (val); data/gvpe-3.1/src/conf.C:311:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.change_uid = atoi (val); data/gvpe-3.1/src/conf.C:313:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.change_gid = atoi (val); data/gvpe-3.1/src/conf.C:337:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.rekey = atoi (val); data/gvpe-3.1/src/conf.C:339:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.keepalive = atoi (val); data/gvpe-3.1/src/conf.C:341:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.mtu = atoi (val); data/gvpe-3.1/src/conf.C:343:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.nfmark = atoi (val); data/gvpe-3.1/src/conf.C:347:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.reseed = atoi (val); data/gvpe-3.1/src/conf.C:367:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.dns_forw_port = atoi (val); data/gvpe-3.1/src/conf.C:379:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.dns_send_interval = atoi (val); data/gvpe-3.1/src/conf.C:391:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.dns_max_outstanding = atoi (val); data/gvpe-3.1/src/conf.C:409:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.proxy_port = atoi (val); data/gvpe-3.1/src/conf.C:425:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). node->udp_port = atoi (val); data/gvpe-3.1/src/conf.C:427:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). node->tcp_port = atoi (val); data/gvpe-3.1/src/conf.C:437:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). node->dns_port = atoi (val); data/gvpe-3.1/src/conf.C:449:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). node->routerprio = atoi (val); data/gvpe-3.1/src/conf.C:451:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). node->max_retry = atoi (val); data/gvpe-3.1/src/conf.C:505:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). node->max_queue = atoi (val); data/gvpe-3.1/src/conf.C:533:17: [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 (FILE *f = fopen (fname, "r")) data/gvpe-3.1/src/conf.C:535:7: [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 line [2048]; data/gvpe-3.1/src/conf.C:574:17: [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 (FILE *f = fopen (fname, "r")) data/gvpe-3.1/src/conf.C:611:11: [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 (fname, "r"); data/gvpe-3.1/src/conf.h:131: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 serial[SERIAL_SIZE]; data/gvpe-3.1/src/connection.C:374:12: [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 hmac_digest[EVP_MAX_MD_SIZE]; data/gvpe-3.1/src/connection.C:376:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (hmac, hmac_digest, HMACLENGTH); data/gvpe-3.1/src/connection.C:382:12: [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 hmac_digest[EVP_MAX_MD_SIZE]; data/gvpe-3.1/src/connection.C:619: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 magic[8]; data/gvpe-3.1/src/connection.C:628:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (magic, MAGIC, 8); data/gvpe-3.1/src/connection.C:821:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (pkt->response.ecdh, rcv_ecdh_b, sizeof rcv_ecdh_b); data/gvpe-3.1/src/connection.C:1147:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (snd_ecdh_b, p->response.ecdh, sizeof snd_ecdh_b); data/gvpe-3.1/src/curve25519-donna-c64.c:301:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(origx, x, 5 * sizeof(limb)); data/gvpe-3.1/src/curve25519-donna-c64.c:305:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(origxprime, xprime, sizeof(limb) * 5); data/gvpe-3.1/src/curve25519-donna-c64.c:310:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(origxprime, xxprime, sizeof(limb) * 5); data/gvpe-3.1/src/curve25519-donna-c64.c:360:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nqpqx, q, sizeof(limb) * 5); data/gvpe-3.1/src/curve25519-donna-c64.c:394:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(resultx, nqx, sizeof(limb) * 5); data/gvpe-3.1/src/curve25519-donna-c64.c:395:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(resultz, nqz, sizeof(limb) * 5); data/gvpe-3.1/src/curve25519-donna.c:336:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(output, t, sizeof(limb) * 10); data/gvpe-3.1/src/curve25519-donna.c:420:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(output, t, sizeof(limb) * 10); data/gvpe-3.1/src/curve25519-donna.c:633:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(origx, x, 10 * sizeof(limb)); data/gvpe-3.1/src/curve25519-donna.c:639:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(origxprime, xprime, sizeof(limb) * 10); data/gvpe-3.1/src/curve25519-donna.c:656:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(origxprime, xxprime, sizeof(limb) * 10); data/gvpe-3.1/src/curve25519-donna.c:670:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(x3, xxxprime, sizeof(limb) * 10); data/gvpe-3.1/src/curve25519-donna.c:671:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(z3, zzprime, sizeof(limb) * 10); data/gvpe-3.1/src/curve25519-donna.c:735:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nqpqx, q, sizeof(limb) * 10); data/gvpe-3.1/src/curve25519-donna.c:769:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(resultx, nqx, sizeof(limb) * 10); data/gvpe-3.1/src/curve25519-donna.c:770:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(resultz, nqz, sizeof(limb) * 10); data/gvpe-3.1/src/curve25519.h:37:18: [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. typedef unsigned char curve25519_key[CURVE25519_SIZE]; data/gvpe-3.1/src/device-cygwin.C:77:10: [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. static char buf[1024]; data/gvpe-3.1/src/device-cygwin.C:148: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 regpath[1024]; data/gvpe-3.1/src/device-cygwin.C:149: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 adapterid[1024]; data/gvpe-3.1/src/device-cygwin.C:151: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 tapname[1024]; data/gvpe-3.1/src/device-cygwin.C:307:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&(*pkt)[6], &local_mac, sizeof (mac)); data/gvpe-3.1/src/device-cygwin.C:312:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&(*pkt)[22], &local_mac, sizeof (mac)); data/gvpe-3.1/src/device-cygwin.C:315:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&(*pkt)[32], &local_mac, sizeof (mac)); data/gvpe-3.1/src/device-darwin.C:70:13: [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 (device, O_RDWR | O_NONBLOCK)) < 0) data/gvpe-3.1/src/device-linux.C:82:8: [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). fd = open (device, O_RDWR); data/gvpe-3.1/src/device.h:69:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&((*this)[0]), &(pkt[0]), len); data/gvpe-3.1/src/device.h:129: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 ifrname[IFNAMESIZE + 1]; data/gvpe-3.1/src/ether_emu.C:128:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (rep->dst, pkt->src, sizeof (mac)); data/gvpe-3.1/src/ether_emu.C:139:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&(*rep)[32], &(*pkt)[22], sizeof (mac)); data/gvpe-3.1/src/gvpe.C:219: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 [SEED_SIZE]; data/gvpe-3.1/src/gvpe.C:239:13: [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). rand_fd = open (conf.seed_dev, O_RDONLY | O_NONBLOCK | O_BINARY); data/gvpe-3.1/src/gvpectrl.C:159:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). kill_gvpe = atoi (optarg); data/gvpe-3.1/src/gvpectrl.C:252:16: [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). FILE *pubf = fopen (pub, "ab"); data/gvpe-3.1/src/gvpectrl.C:265:17: [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). FILE *privf = fopen (priv, "ab"); data/gvpe-3.1/src/hkdf.C:87:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (okm, tn, ol); data/gvpe-3.1/src/hkdf.C:243:7: [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 okm[256]; data/gvpe-3.1/src/iv_gen.C:65:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (ptr, block, len); data/gvpe-3.1/src/iv_gen.C:69:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (ptr, block, AES_BLOCK_SIZE); data/gvpe-3.1/src/sockinfo.C:80:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&host, he->h_addr_list[0], 4); //sa->sin_family = he->h_addrtype; data/gvpe-3.1/src/sockinfo.C:114:8: [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. static char hostport[10 + 15 + 1 + 5 + 1]; // proto / IPv4 : port data/gvpe-3.1/src/sockinfo.C:121:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (hostport, "%.15s", inet_ntoa (ia)); data/gvpe-3.1/src/tincd/bsd/device.c:54: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((device_fd = open(device, O_RDWR | O_NONBLOCK)) < 0) { data/gvpe-3.1/src/tincd/cygwin/device.c:45: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 regpath[1024]; data/gvpe-3.1/src/tincd/cygwin/device.c:46: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 adapterid[1024]; data/gvpe-3.1/src/tincd/cygwin/device.c:47: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 adaptername[1024]; data/gvpe-3.1/src/tincd/cygwin/device.c:48: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 tapname[1024]; data/gvpe-3.1/src/tincd/cygwin/device.c:170: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[MTU]; data/gvpe-3.1/src/tincd/darwin/device.c:44: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((device_fd = open(device, O_RDWR | O_NONBLOCK)) < 0) { data/gvpe-3.1/src/tincd/freebsd/device.c:44: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((device_fd = open(device, O_RDWR | O_NONBLOCK)) < 0) { data/gvpe-3.1/src/tincd/linux/device.c:44:1: [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 ifrname[IFNAMSIZ]; data/gvpe-3.1/src/tincd/linux/device.c:65:14: [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). device_fd = open(device, O_RDWR | O_NONBLOCK); data/gvpe-3.1/src/tincd/mingw/device.c:50: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[MTU]; data/gvpe-3.1/src/tincd/mingw/device.c:112: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 regpath[1024]; data/gvpe-3.1/src/tincd/mingw/device.c:113: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 adapterid[1024]; data/gvpe-3.1/src/tincd/mingw/device.c:114: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 adaptername[1024]; data/gvpe-3.1/src/tincd/mingw/device.c:115: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 tapname[1024]; data/gvpe-3.1/src/tincd/netbsd/device.c:47: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((device_fd = open(device, O_RDWR | O_NONBLOCK)) < 0) { data/gvpe-3.1/src/tincd/openbsd/device.c:48: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((device_fd = open(device, O_RDWR | O_NONBLOCK)) < 0) { data/gvpe-3.1/src/tincd/raw_socket/device.c:29:1: [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 ifrname[IFNAMSIZ]; data/gvpe-3.1/src/tincd/solaris/device.c:51: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((device_fd = open(device, O_RDWR | O_NONBLOCK)) < 0) { data/gvpe-3.1/src/tincd/solaris/device.c:61:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ppa = atoi(ptr); data/gvpe-3.1/src/tincd/solaris/device.c:63:14: [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((ip_fd = open("/dev/ip", O_RDWR, 0)) < 0) { data/gvpe-3.1/src/tincd/solaris/device.c:74:14: [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((if_fd = open(device, O_RDWR, 0)) < 0) { data/gvpe-3.1/src/tincd/uml_socket/device.c:106:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&data_sun.sun_path, &name, sizeof name); data/gvpe-3.1/src/util.C:318:16: [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. const static char base64[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; data/gvpe-3.1/src/vpn.C:125:7: [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 ext[16]; data/gvpe-3.1/src/vpn.C:426: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. char dir [L_tmpnam]; data/gvpe-3.1/src/vpn.C:595:45: [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. c->conf->nodename, (const char *)rsi, data/gvpe-3.1/src/vpn_dns.C:119: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 encode [256]; // index => char data/gvpe-3.1/src/vpn_dns.C:268:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dst + dlen - n, dst_, n); data/gvpe-3.1/src/vpn_dns.C:271:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dst, dst_ + n - dlen, dlen); data/gvpe-3.1/src/vpn_dns.C:284:10: [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. static char enc[200]; data/gvpe-3.1/src/vpn_dns.C:380:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (this->data + fill, data, datalen); fill += datalen; data/gvpe-3.1/src/vpn_dns.C:394:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (data + fill, pkt->at (0), pkt->len); fill += pkt->len; data/gvpe-3.1/src/vpn_dns.C:425:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (pkt->at (0), data + 2, len); data/gvpe-3.1/src/vpn_dns.C:574:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (data, &((*this)[offs]), len); data/gvpe-3.1/src/vpn_dns.C:699:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (pkt.at (offs), domain, len); data/gvpe-3.1/src/vpn_dns.C:725: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 enc[256], *encp = enc; data/gvpe-3.1/src/vpn_dns.C:741:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (pkt->at (offs), encp, lbllen); data/gvpe-3.1/src/vpn_dns.C:797:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (this->data, data, datalen); data/gvpe-3.1/src/vpn_dns.C:922:7: [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 qname [MAXSIZE]; data/gvpe-3.1/src/vpn_dns.C:974:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (r->pkt->at (6 * 2 + 1), pkt.at (6 * 2 + 1), HDRSIZE); data/gvpe-3.1/src/vpn_dns.C:977:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (pkt.at (0), r->pkt->at (0), offs = r->pkt->len); data/gvpe-3.1/src/vpn_dns.C:1021:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (pkt.at (offs), dns->snddq.begin (), txtlen); data/gvpe-3.1/src/vpn_dns.C:1051:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (rcv->pkt->at (0), pkt.at (0), offs); data/gvpe-3.1/src/vpn_dns.C:1087:23: [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 qname2 [MAX_ENC_LEN]; data/gvpe-3.1/src/vpn_dns.C:1158:13: [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 qname[MAXSIZE]; data/gvpe-3.1/src/vpn_dns.C:1190:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (datap, pkt.at (offs), txtlen); data/gvpe-3.1/src/vpn_tcp.C:315: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. char r[1024]; data/gvpe-3.1/libev/ev.c:1678:30: [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). write (STDERR_FILENO, msg, strlen (msg)); data/gvpe-3.1/libev/ev.c:2505:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (evpipe [1], &counter, sizeof (uint64_t)); data/gvpe-3.1/libev/ev.c:2519:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (evpipe [0], &dummy, sizeof (dummy)); data/gvpe-3.1/libev/ev.c:2621:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t res = read (sigfd, si, sizeof (si)); data/gvpe-3.1/libev/ev.c:4298:51: [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). if ((errno == ENOENT || errno == EACCES) && strlen (w->path) < 4096) data/gvpe-3.1/libev/ev.c:4384:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int len = read (fs_fd, buf, sizeof (buf)); data/gvpe-3.1/src/conf.C:239:24: [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). char *end = line + strlen (line); data/gvpe-3.1/src/conf.C:292:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (conf.serial, val, sizeof (conf.serial)); data/gvpe-3.1/src/conf.C:415:65: [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). conf.proxy_auth = (char *)base64_encode ((const u8 *)val, strlen (val)); data/gvpe-3.1/src/connection.C:578:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ((char *)serial, conf.serial, sizeof (serial)); data/gvpe-3.1/src/device-cygwin.C:83:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (buf, _("(unable to format errormessage)"), sizeof (buf)); data/gvpe-3.1/src/device-cygwin.C:279:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (sizeof (u32) != read (iopipe[0], &pkt->len, sizeof (u32))) data/gvpe-3.1/src/device-cygwin.C:286:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (pkt->len != read (iopipe[0], &((*pkt)[0]), pkt->len)) data/gvpe-3.1/src/device-darwin.C:91:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pkt->len = read (fd, &((*pkt)[0]), MAX_MTU); data/gvpe-3.1/src/device-linux.C:98:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (ifr.ifr_name, conf.ifname, IFNAMSIZ); data/gvpe-3.1/src/device-linux.C:104:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (ifrname, ifr.ifr_name, IFNAMSIZ); data/gvpe-3.1/src/device-linux.C:140:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pkt->len = read (fd, &((*pkt)[14]), MAX_MTU - 14); data/gvpe-3.1/src/device-linux.C:142:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pkt->len = read (fd, &((*pkt)[0]), MAX_MTU); data/gvpe-3.1/src/gvpe.C:220:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int n = read (rand_fd, buf, sizeof (buf)); data/gvpe-3.1/src/slog.C:99:26: [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). write (2, msg, strlen (msg)); data/gvpe-3.1/src/tincd/bsd/device.c:143:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((lenin = read(device_fd, packet->data + 14, MTU - 14)) <= 0) { data/gvpe-3.1/src/tincd/bsd/device.c:201:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((lenin = read(device_fd, packet->data, MTU)) <= 0) { data/gvpe-3.1/src/tincd/cygwin/device.c:199:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(device_fd, &gelukt, 1); data/gvpe-3.1/src/tincd/cygwin/device.c:229:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((lenin = read(sp[0], packet->data, MTU)) <= 0) { data/gvpe-3.1/src/tincd/darwin/device.c:69:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((lenin = read(device_fd, packet->data + 14, MTU - 14)) <= 0) { data/gvpe-3.1/src/tincd/freebsd/device.c:69:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((lenin = read(device_fd, packet->data, MTU)) <= 0) { data/gvpe-3.1/src/tincd/linux/device.c:87:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, iface, IFNAMSIZ); data/gvpe-3.1/src/tincd/linux/device.c:90:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifrname, ifr.ifr_name, IFNAMSIZ); data/gvpe-3.1/src/tincd/linux/device.c:94:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifrname, ifr.ifr_name, IFNAMSIZ); data/gvpe-3.1/src/tincd/linux/device.c:126:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lenin = read(device_fd, packet->data + 10, MTU - 10); data/gvpe-3.1/src/tincd/linux/device.c:137:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lenin = read(device_fd, packet->data, MTU); data/gvpe-3.1/src/tincd/linux/device.c:148:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). lenin = read(device_fd, packet->data - 2, MTU + 2); data/gvpe-3.1/src/tincd/netbsd/device.c:72:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((lenin = read(device_fd, packet->data + 14, MTU - 14)) <= 0) { data/gvpe-3.1/src/tincd/raw_socket/device.c:58:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_ifrn.ifrn_name, iface, IFNAMSIZ); data/gvpe-3.1/src/tincd/raw_socket/device.c:94:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((lenin = read(device_fd, packet->data, MTU)) <= 0) { data/gvpe-3.1/src/tincd/solaris/device.c:119:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((lenin = read(device_fd, packet->data + 14, MTU - 14)) <= 0) { data/gvpe-3.1/src/tincd/uml_socket/device.c:128:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(listen_sun.sun_path, device, sizeof listen_sun.sun_path); data/gvpe-3.1/src/tincd/uml_socket/device.c:201:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((lenin = read(request_fd, &request, sizeof request)) != sizeof request) { data/gvpe-3.1/src/tincd/uml_socket/device.c:231:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((lenin = read(data_fd, packet->data, MTU)) <= 0) { data/gvpe-3.1/src/vpn_dns.C:694:24: [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). end = domain + strlen (domain); data/gvpe-3.1/src/vpn_dns.C:721:33: [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). int dlen = MAX_DOMAIN_SIZE - (strlen (dns->c->conf->domain) + 2); data/gvpe-3.1/src/vpn_dns.C:935:18: [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). int dlen = strlen (THISNODE->domain); data/gvpe-3.1/src/vpn_tcp.C:275:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t len = read (fd, &((*r_pkt)[r_ofs < 2 ? r_ofs : r_ofs - 2]), r_len); data/gvpe-3.1/src/vpn_tcp.C:322:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int l = read (fd, &r[i], 1); ANALYSIS SUMMARY: Hits = 205 Lines analyzed = 24189 in approximately 0.63 seconds (38385 lines/second) Physical Source Lines of Code (SLOC) = 16485 Hits@level = [0] 98 [1] 44 [2] 138 [3] 8 [4] 15 [5] 0 Hits@level+ = [0+] 303 [1+] 205 [2+] 161 [3+] 23 [4+] 15 [5+] 0 Hits/KSLOC@level+ = [0+] 18.3803 [1+] 12.4355 [2+] 9.76645 [3+] 1.39521 [4+] 0.909918 [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.