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/network-manager-l2tp-1.2.18/properties/resources.h Examining data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor.h Examining data/network-manager-l2tp-1.2.18/properties/ppp-dialog.c Examining data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor.c Examining data/network-manager-l2tp-1.2.18/properties/resources.c Examining data/network-manager-l2tp-1.2.18/properties/ppp-dialog.h Examining data/network-manager-l2tp-1.2.18/properties/ipsec-dialog.h Examining data/network-manager-l2tp-1.2.18/properties/ipsec-dialog.c Examining data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor-plugin.h Examining data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor-plugin.c Examining data/network-manager-l2tp-1.2.18/shared/utils.h Examining data/network-manager-l2tp-1.2.18/shared/nm-service-defines.h Examining data/network-manager-l2tp-1.2.18/shared/nm-utils/gsystem-local-alloc.h Examining data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-vpn-plugin-utils.c Examining data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-vpn-plugin-utils.h Examining data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-macros-internal.h Examining data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c Examining data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-glib.h Examining data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-vpn-plugin-macros.h Examining data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.h Examining data/network-manager-l2tp-1.2.18/shared/nm-default.h Examining data/network-manager-l2tp-1.2.18/shared/utils.c Examining data/network-manager-l2tp-1.2.18/auth-dialog/main.c Examining data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.h Examining data/network-manager-l2tp-1.2.18/src/nm-l2tp-pppd-plugin.c Examining data/network-manager-l2tp-1.2.18/src/nm-ppp-status.h Examining data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c FINAL RESULTS: data/network-manager-l2tp-1.2.18/src/nm-l2tp-pppd-plugin.c:63:14: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. syslog (nm_utils_syslog_coerce_from_nm (level), \ data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:996:9: [4] (shell) system: 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. sys = system (cmdbuf); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1019:9: [4] (shell) system: 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. sys = system (cmdbuf); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1022:10: [4] (shell) system: 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. sys = system (cmdbuf); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1028:10: [4] (shell) system: 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. sys = system (cmdbuf); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1035:9: [4] (shell) system: 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. sys = system (cmdbuf); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1038:10: [4] (shell) system: 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. sys = system (cmdbuf); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1042:9: [4] (shell) system: 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. sys = system (cmdbuf); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1047:10: [4] (shell) system: 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. sys = system (cmdbuf); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1055:10: [4] (shell) system: 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. sys = system (cmdbuf); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1062:9: [4] (shell) system: 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. sys = system (cmdbuf); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1065:10: [4] (shell) system: 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. sys = system (cmdbuf); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1075:9: [4] (shell) system: 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. sys = system(cmdbuf); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1148:10: [4] (shell) system: 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. sys = system (cmdbuf); data/network-manager-l2tp-1.2.18/src/nm-l2tp-pppd-plugin.c:313:13: [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. bus_name = getenv ("NM_DBUS_SERVICE_L2TP"); data/network-manager-l2tp-1.2.18/src/nm-l2tp-pppd-plugin.c:317:47: [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. gl.log_level = _nm_utils_ascii_str_to_int64 (getenv ("NM_VPN_LOG_LEVEL"), data/network-manager-l2tp-1.2.18/src/nm-l2tp-pppd-plugin.c:320:24: [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. gl.log_prefix_token = getenv ("NM_VPN_LOG_PREFIX_TOKEN") ?: "???"; data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:707:9: [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. if (getenv ("PLUTODEBUG")) { data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:708:58: [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. write_config_option (fd, " plutodebug=\"%s\"\n\n", getenv ("PLUTODEBUG")); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:713:9: [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. if (getenv ("CHARONDEBUG")) { data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:714:59: [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. write_config_option (fd, " charondebug=\"%s\"\n\n", getenv ("CHARONDEBUG")); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1460:6: [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. if (getenv ("NM_L2TP_DUMP_CONNECTION") || _LOGD_enabled ()) data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1767:6: [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. if (getenv ("NM_PPP_DEBUG")) data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1770:47: [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. gl.log_level = _nm_utils_ascii_str_to_int64 (getenv ("NM_VPN_LOG_LEVEL"), data/network-manager-l2tp-1.2.18/properties/ipsec-dialog.c:144: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 (psk, decoded, len); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-macros-internal.h:652: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. ((const char *const[(sizeof (((const char *const[]) { __VA_ARGS__ })) / sizeof (const char *)) + 1]) { __VA_ARGS__ }) data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-macros-internal.h:1300: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 (s, str, l); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-macros-internal.h:1428: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 (&_buf[1], _str, _strlen_trunc); \ data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:82:4: [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 (*buf, str, *len - 1); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:87:4: [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 (*buf, str, str_len); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:525: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 addrstr_buf[MAX (INET_ADDRSTRLEN, INET6_ADDRSTRLEN)]; data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:586: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 addrstr_buf[MAX (INET_ADDRSTRLEN, INET6_ADDRSTRLEN)]; data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:918: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 (s0, str, str_len); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:932:4: [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, ptr_old, sizeof (const char *) * plen); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:963: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 (s, s0, str_len); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:1976:26: [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. cmp = cmpfcn (&((const char *) list)[elem_size * imid], needle, user_data); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:2068: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 filename[256]; data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.h:124: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 (dst, data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.h:252: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 (p, data, size); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.h:500: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. extern char _nm_utils_to_string_buffer[2096]; data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:85: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 ipsec_binary_path[256]; data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:570: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 errorbuf[128]; data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:633: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). fd = open (ipsec_secrets_file, O_CREAT|O_WRONLY, S_IRUSR|S_IWUSR); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:656: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 (filename, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:697: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 (filename, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:820: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). fd = open (filename, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:862: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). fd = open (filename, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:974: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 cmdbuf[256]; data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1008: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 cmdbuf[256]; data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1326: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[INET_ADDRSTRLEN]; data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1371:4: [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 (&naddr, &(inptr->sin_addr), sizeof (struct in_addr)); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1729: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 sbuf[30]; data/network-manager-l2tp-1.2.18/auth-dialog/main.c:214:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read (0, &c, 1); data/network-manager-l2tp-1.2.18/properties/ipsec-dialog.c:456:70: [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 *psk_base64 = g_base64_encode ((const unsigned char *) value, strlen (value)); data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor.c:74:9: [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 = strlen (scpy); data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor.c:98:15: [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 (!str || !strlen (s = strstrip (str))) { data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor.c:311: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). if ((!value || !strlen (value)) && (pw_flags == NM_SETTING_SECRET_FLAG_NONE)) data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor.c:337:16: [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 (value && strlen (value)) data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor.c:348:16: [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 (value && strlen (value)) data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor.c:359:16: [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 (value && strlen (value)) data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor.c:434:19: [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 (password && strlen (password)) data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor.c:469:11: [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 (s && strlen (s)) data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor.c:476:13: [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 (str && strlen (str)) data/network-manager-l2tp-1.2.18/properties/nm-l2tp-editor.c:488:13: [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 (str && strlen (str)) data/network-manager-l2tp-1.2.18/properties/ppp-dialog.c:468:15: [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 (value && strlen (value)) { data/network-manager-l2tp-1.2.18/properties/resources.c:10026:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). __pragma(section(".CRT$XCU",read)) \ data/network-manager-l2tp-1.2.18/properties/resources.c:10034:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). __pragma(section(".CRT$XCU",read)) \ data/network-manager-l2tp-1.2.18/properties/resources.c:10046:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). section(".CRT$XCU",read) data/network-manager-l2tp-1.2.18/properties/resources.c:10053:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). section(".CRT$XCU",read) data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-glib.h:478:36: [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). bytes = g_bytes_new_take (string, strlen (string) + 1); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-macros-internal.h:1291:6: [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). l = strlen (str); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-macros-internal.h:1421:41: [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). const gsize _strlen_trunc = NM_MIN (strlen (_str), _trunc_at); \ data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-macros-internal.h:1483:27: [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). const gsize _name_len = strlen (_name); \ data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:911:12: [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). str_len = strlen (str) + 1; data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:1065:8: [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). len = strlen (str); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:1388:8: [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). len = strlen (str); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:1510:12: [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). buflen = strlen (str); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:1719:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). k = read (fd, p, nbytes); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.c:2224:21: [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). ret = g_new (char, strlen (str) * 2 + 1); data/network-manager-l2tp-1.2.18/shared/nm-utils/nm-shared-utils.h:261:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (s, str, len); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:364: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). if (!value || !strlen (value)) { data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:496:25: [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). x = write (fd, string, strlen (string)); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:687: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). psk_base64 = g_base64_encode ((const unsigned char *) value, strlen (value)); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1109:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep (250000); /* 0.25 seconds */ data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1228:16: [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 (!user || !strlen (user)) data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1230:16: [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 (!user || !strlen (user)) { data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1239:20: [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 (!password || !strlen (password)) { data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1251:16: [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 (domain && strlen (domain)) data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1415:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (priv->ipsec_binary_path, value, sizeof(priv->ipsec_binary_path) - 1); data/network-manager-l2tp-1.2.18/src/nm-l2tp-service.c:1437: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). if (!gwaddr || !strlen (gwaddr)) { ANALYSIS SUMMARY: Hits = 90 Lines analyzed = 21376 in approximately 1.19 seconds (17906 lines/second) Physical Source Lines of Code (SLOC) = 17701 Hits@level = [0] 22 [1] 38 [2] 28 [3] 10 [4] 14 [5] 0 Hits@level+ = [0+] 112 [1+] 90 [2+] 52 [3+] 24 [4+] 14 [5+] 0 Hits/KSLOC@level+ = [0+] 6.32733 [1+] 5.08446 [2+] 2.93769 [3+] 1.35586 [4+] 0.790916 [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.