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/kore-4.0.1/examples/async-curl/src/ftp.c Examining data/kore-4.0.1/examples/async-curl/src/http.c Examining data/kore-4.0.1/examples/cookies/src/cookies.c Examining data/kore-4.0.1/examples/cpp/src/cpp.cpp Examining data/kore-4.0.1/examples/cpp/src/example_class.cpp Examining data/kore-4.0.1/examples/cpp/src/example_class.h Examining data/kore-4.0.1/examples/generic/src/example.c Examining data/kore-4.0.1/examples/headers/src/headers.c Examining data/kore-4.0.1/examples/integers/src/check_integers.c Examining data/kore-4.0.1/examples/json/src/json.c Examining data/kore-4.0.1/examples/json_yajl/src/json_yajl.c Examining data/kore-4.0.1/examples/jsonrpc/src/home.c Examining data/kore-4.0.1/examples/jsonrpc/src/v1.c Examining data/kore-4.0.1/examples/memtag/src/memtag.c Examining data/kore-4.0.1/examples/messaging/src/messaging.c Examining data/kore-4.0.1/examples/nohttp/src/nohttp.c Examining data/kore-4.0.1/examples/parameters/src/parameters.c Examining data/kore-4.0.1/examples/pgsql-sync/src/pgsql-sync.c Examining data/kore-4.0.1/examples/pgsql/src/init.c Examining data/kore-4.0.1/examples/pgsql/src/pgsql.c Examining data/kore-4.0.1/examples/pgsql/src/pgsql_cb.c Examining data/kore-4.0.1/examples/pipe_task/src/pipe_task.c Examining data/kore-4.0.1/examples/sse/src/sse.c Examining data/kore-4.0.1/examples/tasks/src/tasks.c Examining data/kore-4.0.1/examples/tls-proxy/src/proxy.c Examining data/kore-4.0.1/examples/upload/src/upload.c Examining data/kore-4.0.1/examples/video_stream/src/stream.c Examining data/kore-4.0.1/examples/websocket/src/websocket.c Examining data/kore-4.0.1/include/kore/acme.h Examining data/kore-4.0.1/include/kore/curl.h Examining data/kore-4.0.1/include/kore/http.h Examining data/kore-4.0.1/include/kore/jsonrpc.h Examining data/kore-4.0.1/include/kore/kore.h Examining data/kore-4.0.1/include/kore/pgsql.h Examining data/kore-4.0.1/include/kore/python_api.h Examining data/kore-4.0.1/include/kore/python_methods.h Examining data/kore-4.0.1/include/kore/seccomp.h Examining data/kore-4.0.1/include/kore/tasks.h Examining data/kore-4.0.1/misc/curl/python_curlopt.h Examining data/kore-4.0.1/src/accesslog.c Examining data/kore-4.0.1/src/auth.c Examining data/kore-4.0.1/src/bsd.c Examining data/kore-4.0.1/src/buf.c Examining data/kore-4.0.1/src/cli.c Examining data/kore-4.0.1/src/config.c Examining data/kore-4.0.1/src/connection.c Examining data/kore-4.0.1/src/curl.c Examining data/kore-4.0.1/src/domain.c Examining data/kore-4.0.1/src/filemap.c Examining data/kore-4.0.1/src/fileref.c Examining data/kore-4.0.1/src/http.c Examining data/kore-4.0.1/src/json.c Examining data/kore-4.0.1/src/jsonrpc.c Examining data/kore-4.0.1/src/kore.c Examining data/kore-4.0.1/src/linux.c Examining data/kore-4.0.1/src/mem.c Examining data/kore-4.0.1/src/module.c Examining data/kore-4.0.1/src/msg.c Examining data/kore-4.0.1/src/net.c Examining data/kore-4.0.1/src/pgsql.c Examining data/kore-4.0.1/src/pool.c Examining data/kore-4.0.1/src/python.c Examining data/kore-4.0.1/src/runtime.c Examining data/kore-4.0.1/src/tasks.c Examining data/kore-4.0.1/src/timer.c Examining data/kore-4.0.1/src/utils.c Examining data/kore-4.0.1/src/validator.c Examining data/kore-4.0.1/src/websocket.c Examining data/kore-4.0.1/src/worker.c Examining data/kore-4.0.1/src/acme.c Examining data/kore-4.0.1/src/keymgr.c Examining data/kore-4.0.1/src/seccomp.c FINAL RESULTS: data/kore-4.0.1/src/seccomp.c:91:21: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. KORE_SYSCALL_ALLOW(readlink), data/kore-4.0.1/include/kore/kore.h:855:30: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format (printf, 2, 3))); data/kore-4.0.1/src/buf.c:92:6: [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. l = vsnprintf(sb, sizeof(sb), fmt, args); data/kore-4.0.1/src/cli.c:1506:2: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(compiler, args); data/kore-4.0.1/src/cli.c:1539:2: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(compiler_ld, args); data/kore-4.0.1/src/cli.c:1584:2: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(args[0], args); data/kore-4.0.1/src/cli.c:1605:2: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(args[0], args); data/kore-4.0.1/src/cli.c:1638:2: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(args[0], args); data/kore-4.0.1/src/cli.c:2276:6: [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. l = vsnprintf(sb, sizeof(sb), fmt, args); data/kore-4.0.1/src/cli.c:2416:8: [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. (void)vsnprintf(buf, sizeof(buf), fmt, args); data/kore-4.0.1/src/keymgr.c:95:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. KORE_SYSCALL_ALLOW(access), data/kore-4.0.1/src/keymgr.c:411:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(dom->certfile, R_OK) == -1) { data/kore-4.0.1/src/keymgr.c:926:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(dom->certfile, R_OK) == -1) { data/kore-4.0.1/src/keymgr.c:1239:8: [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. len = vsnprintf(buf, sizeof(buf), fmt, args); data/kore-4.0.1/src/seccomp.c:83:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. KORE_SYSCALL_ALLOW(access), data/kore-4.0.1/src/utils.c:75:8: [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. (void)vsnprintf(buf, sizeof(buf), fmt, args); data/kore-4.0.1/src/utils.c:104:8: [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. (void)vsnprintf(buf, sizeof(buf), fmt, args); data/kore-4.0.1/src/utils.c:155:6: [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. l = vsnprintf(str, size, fmt, args); data/kore-4.0.1/src/utils.c:521:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(path, R_OK) == -1) data/kore-4.0.1/src/utils.c:694:8: [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. (void)vsnprintf(buf, sizeof(buf), fmt, args); data/kore-4.0.1/src/cli.c:440: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. if ((env = getenv("KORE_PREFIX")) != NULL) data/kore-4.0.1/src/cli.c:443: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. if ((env = getenv("KORE_OBJDIR")) != NULL) data/kore-4.0.1/src/cli.c:446: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. if ((env = getenv("KODEV_OUTPUT")) != NULL) data/kore-4.0.1/src/cli.c:501:15: [3] (buffer) getopt: 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 ((ch = getopt(argc, argv, "hp")) != -1) { data/kore-4.0.1/src/cli.c:613:11: [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 ((p = getenv("CC")) != NULL) { data/kore-4.0.1/src/cli.c:618:11: [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 ((p = getenv("CXX")) != NULL) { data/kore-4.0.1/src/cli.c:1708: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. if ((env = getenv("KORE_SOURCE")) != NULL) data/kore-4.0.1/src/cli.c:1711: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. if ((env = getenv("KORE_FLAVOR")) != NULL) data/kore-4.0.1/src/cli.c:1965: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. if ((env = getenv("CFLAGS")) != NULL) data/kore-4.0.1/src/cli.c:1992: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. if ((env = getenv("CXXFLAGS")) != NULL) data/kore-4.0.1/src/cli.c:2041: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. if ((env = getenv("LDFLAGS")) != NULL) data/kore-4.0.1/src/cli.c:2055: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. if ((env = getenv("KORE_BUILD_FLAVOR")) != NULL) { data/kore-4.0.1/src/filemap.c:128:7: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(entry->ondisk, rpath) == NULL) data/kore-4.0.1/src/filemap.c:203:6: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(fpath, rpath) == NULL) { data/kore-4.0.1/src/kore.c:175:15: [3] (buffer) getopt: 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 ((ch = getopt(argc, argv, "c:dfhnqrv")) != -1) { data/kore-4.0.1/src/kore.c:177:15: [3] (buffer) getopt: 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 ((ch = getopt(argc, argv, "dfhnqrv")) != -1) { data/kore-4.0.1/src/worker.c:302:7: [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(root) == -1) { data/kore-4.0.1/examples/generic/src/example.c:101: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 *name, buf[BUFSIZ]; data/kore-4.0.1/examples/generic/src/example.c:199: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 *test, name[10]; data/kore-4.0.1/examples/json_yajl/src/json_yajl.c:31: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 eb[1024]; data/kore-4.0.1/examples/jsonrpc/src/v1.c:81: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 timestamp[33]; data/kore-4.0.1/examples/pipe_task/src/pipe_task.c:139: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 ((fd = open("/tmp/pipe", O_RDONLY)) == -1) { data/kore-4.0.1/examples/tasks/src/tasks.c:75: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 *user, result[64]; data/kore-4.0.1/examples/tasks/src/tasks.c:204: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 user[64], fields[128]; data/kore-4.0.1/examples/upload/src/upload.c:64: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(file->filename, O_CREAT | O_TRUNC | O_WRONLY, 0700); data/kore-4.0.1/examples/video_stream/src/stream.c:70: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 *bytes, *range[3], rb[128], *ext, ctype[32]; data/kore-4.0.1/examples/video_stream/src/stream.c:165: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 fpath[MAXPATHLEN]; data/kore-4.0.1/examples/video_stream/src/stream.c:195: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 ((v->fd = open(fpath, O_RDONLY)) == -1) { data/kore-4.0.1/include/kore/curl.h:53: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 errbuf[CURL_ERROR_SIZE]; data/kore-4.0.1/include/kore/kore.h: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 buf[KORE_ACCESSLOG_BUFLEN]; data/kore-4.0.1/include/kore/kore.h:661: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 domain[KORE_DOMAINNAME_LEN + 1]; data/kore-4.0.1/include/kore/kore.h:667: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 domain[KORE_DOMAINNAME_LEN + 1]; data/kore-4.0.1/src/accesslog.c:49: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 tbuf[128] = { '\0' }; data/kore-4.0.1/src/accesslog.c:70: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 addr[INET6_ADDRSTRLEN], *cn_value; data/kore-4.0.1/src/acme.c:385: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 path[MAXPATHLEN]; data/kore-4.0.1/src/acme.c:518: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 mail[1024]; data/kore-4.0.1/src/acme.c:595: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(domain, data, msg->length); data/kore-4.0.1/src/acme.c:1573: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(sig, ptr, msg->length); data/kore-4.0.1/src/acme.c:1714: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(rsakey_e, data, msg->length); data/kore-4.0.1/src/acme.c:1723: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(rsakey_n, data, msg->length); data/kore-4.0.1/src/auth.c:109: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 *value, *c, *cookie, *cookies[HTTP_MAX_COOKIES]; data/kore-4.0.1/src/bsd.c:46: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 pledges[256] = { "stdio rpath inet" }; data/kore-4.0.1/src/buf.c:79: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((buf->data + buf->offset), data, len); data/kore-4.0.1/src/buf.c:88: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 *b, sb[BUFSIZ]; data/kore-4.0.1/src/buf.c:172: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(tmp, p, off); data/kore-4.0.1/src/buf.c:174: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((tmp + off), dst, len); data/kore-4.0.1/src/buf.c:175: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((tmp + off + len), end, off2); data/kore-4.0.1/src/cli.c:406: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 *cflags[CFLAGS_MAX]; data/kore-4.0.1/src/cli.c:407: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 *cxxflags[CXXFLAGS_MAX]; data/kore-4.0.1/src/cli.c:408: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 *ldflags[LD_FLAGS_MAX]; data/kore-4.0.1/src/cli.c:556: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 pwd[MAXPATHLEN], *conf; data/kore-4.0.1/src/cli.c:606: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 pwd[PATH_MAX], *assets_header; data/kore-4.0.1/src/cli.c:760: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 pwd[PATH_MAX], *sofile; data/kore-4.0.1/src/cli.c:971: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(fpath, flags, 0644)) == -1) data/kore-4.0.1/src/cli.c:1099: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 hash[(SHA256_DIGEST_LENGTH * 2) + 1]; data/kore-4.0.1/src/cli.c:1378: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 issuer[64]; data/kore-4.0.1/src/cli.c:1446:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen("cert/key.pem", "w")) == NULL) data/kore-4.0.1/src/cli.c:1452:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen("cert/server.pem", "w")) == NULL) data/kore-4.0.1/src/cli.c:1471: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 *args[34 + CFLAGS_MAX]; data/kore-4.0.1/src/cli.c:1517: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 *args[source_files_count + 11 + LD_FLAGS_MAX]; data/kore-4.0.1/src/cli.c:1548: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 pwd[MAXPATHLEN], *obj, *args[20], *flavors[7]; data/kore-4.0.1/src/cli.c:1591: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 *args[5], *cmd; data/kore-4.0.1/src/cli.c:1592: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 pwd[MAXPATHLEN]; data/kore-4.0.1/src/cli.c:1614: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 *args[4], *cpath, *cmd, *flags; data/kore-4.0.1/src/cli.c:1648: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[BUFSIZ], *p, *t; data/kore-4.0.1/src/cli.c:1650:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(path, "r")) == NULL) data/kore-4.0.1/src/cli.c:1858: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 *p, *copy, *flavors[10]; data/kore-4.0.1/src/cli.c:2053: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[BUFSIZ], pwd[MAXPATHLEN], *p, *conf, *env; data/kore-4.0.1/src/cli.c:2073:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(".flavor", "r")) == NULL) { data/kore-4.0.1/src/cli.c:2125:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(".flavor.tmp", "w")) == NULL) data/kore-4.0.1/src/cli.c:2263: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((buf->data + buf->offset), d, len); data/kore-4.0.1/src/cli.c:2272: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 *b, sb[BUFSIZ]; data/kore-4.0.1/src/cli.c:2413: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[2048]; data/kore-4.0.1/src/config.c:307: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 path[PATH_MAX]; data/kore-4.0.1/src/config.c:316:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(config_file, "r")) == NULL) { data/kore-4.0.1/src/config.c:386: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[BUFSIZ], *p, *t; data/kore-4.0.1/src/config.c:534:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(path, "r")) == NULL) data/kore-4.0.1/src/config.c:547: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 *argv[3]; data/kore-4.0.1/src/config.c:671: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 *argv[4]; data/kore-4.0.1/src/config.c:688: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 *argv[3]; data/kore-4.0.1/src/config.c:705: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 *argv[3]; data/kore-4.0.1/src/config.c:722: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 fpath[MAXPATHLEN]; data/kore-4.0.1/src/config.c:728:12: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). if ((fd = mkstemp(fpath)) == -1) data/kore-4.0.1/src/config.c:845: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 *argv[3]; data/kore-4.0.1/src/config.c:931: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 *argv[3]; data/kore-4.0.1/src/config.c:1009: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 *argv[4]; data/kore-4.0.1/src/config.c:1040: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 *argv[3]; data/kore-4.0.1/src/config.c:1071: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 *argv[4]; data/kore-4.0.1/src/config.c:1102: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 *argv[3]; data/kore-4.0.1/src/config.c:1138:30: [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). current_domain->accesslog = open(path, data/kore-4.0.1/src/config.c:1154: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 *argv[10]; data/kore-4.0.1/src/config.c:1225: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 *extensions, *ext[10]; data/kore-4.0.1/src/config.c:1453: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 *method, *argv[3]; data/kore-4.0.1/src/config.c:1522: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 *argv[3]; data/kore-4.0.1/src/config.c:1551: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 *argv[3]; data/kore-4.0.1/src/config.c:1891: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 *argv[3]; data/kore-4.0.1/src/curl.c:87: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 user_agent[64]; data/kore-4.0.1/src/curl.c:287: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(ptr, buf->data + buf->offset, len); data/kore-4.0.1/src/curl.c:290: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(ptr, buf->data + buf->offset, len); data/kore-4.0.1/src/curl.c:510: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 *value, *hbuf, *headers[HTTP_REQ_HEADER_MAX]; data/kore-4.0.1/src/domain.c:661: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(&req->data[0], from, req->data_len); data/kore-4.0.1/src/domain.c:671: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(to, keymgr_buf, RSA_size(rsa)); data/kore-4.0.1/src/domain.c:721: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(&req->data[0], dgst, req->data_len); data/kore-4.0.1/src/domain.c:838: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(keymgr_buf, data, keymgr_buflen); data/kore-4.0.1/src/filemap.c:63: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 regex[1024], fpath[PATH_MAX]; data/kore-4.0.1/src/filemap.c:125: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 rpath[PATH_MAX]; data/kore-4.0.1/src/filemap.c:185: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 fpath[PATH_MAX], rpath[PATH_MAX]; data/kore-4.0.1/src/filemap.c:233: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(fpath, O_RDONLY | O_NOFOLLOW)) == -1) { data/kore-4.0.1/src/http.c:155: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 http_version[64]; data/kore-4.0.1/src/http.c:634: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 tbuf[128]; data/kore-4.0.1/src/http.c:724: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 *headers[HTTP_REQ_HEADER_MAX]; data/kore-4.0.1/src/http.c:725: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 *value, *host, *request[4], *hbuf; data/kore-4.0.1/src/http.c:873:24: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). req->http_body_fd = mkstemp(req->http_body_path); data/kore-4.0.1/src/http.c:986: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 *p, *in, h[5]; data/kore-4.0.1/src/http.c:1086: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(buf, file->req->http_body->data + off, toread); data/kore-4.0.1/src/http.c:1143: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 *c, *header, *pair[3]; data/kore-4.0.1/src/http.c:1144: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 *cookies[HTTP_MAX_COOKIES]; data/kore-4.0.1/src/http.c:1174: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 data[BUFSIZ]; data/kore-4.0.1/src/http.c:1175: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 *args[HTTP_MAX_QUERY_ARGS], *val[3], *string; data/kore-4.0.1/src/http.c:1215: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 *query, *args[HTTP_MAX_QUERY_ARGS], *val[3]; data/kore-4.0.1/src/http.c:1237: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 *type, *val, *args[3]; data/kore-4.0.1/src/http.c:1238: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 boundary[HTTP_BOUNDARY_MAX]; data/kore-4.0.1/src/http.c:1355: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(out, data/kore-4.0.1/src/http.c:1531: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 key[4]; data/kore-4.0.1/src/http.c:1859: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 *headers[5], *args[5], *opt[5]; data/kore-4.0.1/src/http.c:2199: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 expires[HTTP_DATE_MAXSIZE]; data/kore-4.0.1/src/json.c:110: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 *tokens[KORE_JSON_DEPTH_MAX + 1]; data/kore-4.0.1/src/jsonrpc.c:110: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 error_buffer[1024]; data/kore-4.0.1/src/keymgr.c:78:21: [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). KORE_SYSCALL_ALLOW(open), data/kore-4.0.1/src/keymgr.c:434:12: [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(file, O_RDONLY)) == -1) { data/kore-4.0.1/src/keymgr.c:468:12: [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(rand_file, O_RDONLY)) == -1) data/kore-4.0.1/src/keymgr.c:524:12: [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(RAND_TMP_FILE, data/kore-4.0.1/src/keymgr.c:935:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(dom->certfile, "r")) == NULL) { data/kore-4.0.1/src/keymgr.c:1039: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(key->dom->certfile, O_CREAT | O_TRUNC | O_WRONLY, 0700); data/kore-4.0.1/src/keymgr.c:1082: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(&retry, data, len); data/kore-4.0.1/src/keymgr.c:1100: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 hex[(SHA256_DIGEST_LENGTH * 2) + 1]; data/kore-4.0.1/src/keymgr.c:1236: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[1024]; data/kore-4.0.1/src/keymgr.c:1305: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[ASN1_GENERALIZEDTIME_LEN + 1]; data/kore-4.0.1/src/kore.c:955:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(kore_pidfile, "w+")) == NULL) { data/kore-4.0.1/src/mem.c:66: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 name[32]; data/kore-4.0.1/src/mem.c:146: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(nptr, ptr, MIN(len, size->len)); data/kore-4.0.1/src/net.c:94: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(nb->buf + nb->b_len, d, len); data/kore-4.0.1/src/net.c:98: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(nb->buf + nb->b_len, d, avail); data/kore-4.0.1/src/net.c:120: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(nb->buf, d, nb->b_len); data/kore-4.0.1/src/net.c:519: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, &r, sizeof(r)); data/kore-4.0.1/src/net.c:528: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, &r, sizeof(r)); data/kore-4.0.1/src/net.c:546: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, &r, sizeof(r)); data/kore-4.0.1/src/pgsql.c:801: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[256]; data/kore-4.0.1/src/python.c:624: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(seccomp->filters + off, filter, len); data/kore-4.0.1/src/python.c:789: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(seccomp->filters + off, filter, len); data/kore-4.0.1/src/python.c:2375: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 *copy, *argv[32]; data/kore-4.0.1/src/python.c:2595: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 addr[INET6_ADDRSTRLEN]; data/kore-4.0.1/src/python.c:4859:30: [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). domain->config->accesslog = open(path, data/kore-4.0.1/src/python.c:5397: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 key[64]; data/kore-4.0.1/src/seccomp.c:55:21: [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). KORE_SYSCALL_ALLOW(open), data/kore-4.0.1/src/seccomp.c:511: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(result, filter, elm * sizeof(struct sock_filter)); data/kore-4.0.1/src/utils.c:72: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[2048]; data/kore-4.0.1/src/utils.c:101: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[2048]; data/kore-4.0.1/src/utils.c:323: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 *args[7], *tbuf[5], *sdup; data/kore-4.0.1/src/utils.c:402:9: [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 tbuf[32]; data/kore-4.0.1/src/utils.c:524:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(path, "r")) == NULL) data/kore-4.0.1/src/utils.c:556:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(path, "w")) == NULL) data/kore-4.0.1/src/utils.c:571:9: [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[64]; data/kore-4.0.1/src/utils.c:691: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[2048]; data/kore-4.0.1/src/worker.c:888: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(dom->acme_cert, req->data, req->data_len); data/kore-4.0.1/examples/cookies/src/cookies.c:55:32: [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). http_response(req, 200, html, strlen(html)); data/kore-4.0.1/examples/cpp/src/cpp.cpp:33:50: [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). static_cast<void*>(const_cast<char*>(str)), strlen(str)); data/kore-4.0.1/examples/generic/src/example.c:83:40: [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). test_base64((u_int8_t *)b64tests[i], strlen(b64tests[i]), res); data/kore-4.0.1/examples/generic/src/example.c:113:14: [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). name, strlen(name)); data/kore-4.0.1/examples/generic/src/example.c:122: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). "$upload$", buf, strlen(buf)); data/kore-4.0.1/examples/generic/src/example.c:213:46: [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). kore_buf_replace_string(b, "$arg1$", test, strlen(test)); data/kore-4.0.1/examples/generic/src/example.c:219:46: [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). kore_buf_replace_string(b, "$arg2$", test, strlen(test)); data/kore-4.0.1/examples/generic/src/example.c:246:43: [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). kore_buf_replace_string(b, name, test, strlen(test)); data/kore-4.0.1/examples/json_yajl/src/json_yajl.c:68:7: [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 (strlen(eb)) { data/kore-4.0.1/examples/jsonrpc/src/v1.c:16:40: [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). return yajl_gen_string(req->gen, str, strlen((const char *)str)); data/kore-4.0.1/examples/jsonrpc/src/v1.c:30: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). (unsigned char *)str, strlen(str)))) data/kore-4.0.1/examples/memtag/src/memtag.c:63:37: [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). http_response(req, 200, fixed_ptr, strlen(fixed_ptr)); data/kore-4.0.1/examples/pgsql/src/pgsql_cb.c:131: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). net_send_queue(c, name, strlen(name)); data/kore-4.0.1/examples/pipe_task/src/pipe_task.c:149:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, sizeof(buf)); data/kore-4.0.1/examples/sse/src/sse.c:89:35: [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). sse_broadcast(req->owner, hello, strlen(hello)); data/kore-4.0.1/examples/sse/src/sse.c:143: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). sse_send(c, ping, strlen(ping)); data/kore-4.0.1/examples/sse/src/sse.c:155:28: [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). sse_broadcast(c, leaving, strlen(leaving)); data/kore-4.0.1/examples/tasks/src/tasks.c:115:47: [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). kore_task_channel_write(&state->task, user, strlen(user)); data/kore-4.0.1/examples/tasks/src/tasks.c:184:32: [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). http_response(req, 200, user, strlen(user)); data/kore-4.0.1/include/kore/kore.h:244:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int (*read)(struct connection *, size_t *); data/kore-4.0.1/include/kore/pgsql.h:31:37: [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). #define KORE_PGSQL_PARAM_TEXT(v) v, strlen(v), 0 data/kore-4.0.1/src/acme.c:1197:7: [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 (strlen(token->data.string) > ACME_CHALLENGE_TOKEN_MAXLEN) { data/kore-4.0.1/src/auth.c:116: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). slen = strlen(auth->value); data/kore-4.0.1/src/auth.c:122: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). len = MIN(slen, strlen(cookies[i])); data/kore-4.0.1/src/buf.c:157: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). klen = strlen(src); data/kore-4.0.1/src/cli.c:449:8: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(S_IWGRP | S_IWOTH); data/kore-4.0.1/src/cli.c:855:42: [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). cli_file_create(name, python_init_data, strlen(python_init_data)); data/kore-4.0.1/src/cli.c:859: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). cli_file_create(name, python_app_data, strlen(python_app_data)); data/kore-4.0.1/src/cli.c:882:34: [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). cli_file_create(name, src_data, strlen(src_data)); data/kore-4.0.1/src/cli.c:994:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, p + offset, bytes - offset); data/kore-4.0.1/src/cli.c:1381:45: [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). cli_file_create("dh2048.pem", dh2048_data, strlen(dh2048_data)); data/kore-4.0.1/src/cli.c:1656:7: [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 (strlen(p) == 0) data/kore-4.0.1/src/cli.c:1684: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). p = cli_text_trim(p, strlen(p)); data/kore-4.0.1/src/cli.c:1685: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). t = cli_text_trim(t, strlen(t)); data/kore-4.0.1/src/cli.c:2129:35: [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 (ret == -1 || (size_t)ret != (strlen(name) + 1)) data/kore-4.0.1/src/config.c:390:7: [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 (strlen(p) == 0) { data/kore-4.0.1/src/config.c:459: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). p = kore_text_trim(p, strlen(p)); data/kore-4.0.1/src/config.c:460: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). t = kore_text_trim(t, strlen(t)); data/kore-4.0.1/src/config.c:462:7: [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 (strlen(p) == 0 || strlen(t) == 0) { data/kore-4.0.1/src/config.c:462: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). if (strlen(p) == 0 || strlen(t) == 0) { data/kore-4.0.1/src/config.c:950: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). if (strlen(argv[0]) >= KORE_DOMAINNAME_LEN - 1) { data/kore-4.0.1/src/config.c:1423:32: [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). tname = kore_text_trim(tname, strlen(tname)); data/kore-4.0.1/src/config.c:1430:32: [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). value = kore_text_trim(value, strlen(value)); data/kore-4.0.1/src/domain.c:446:39: [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). (unsigned char *)SSL_SESSION_ID, strlen(SSL_SESSION_ID)); data/kore-4.0.1/src/filemap.c:65:7: [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). sz = strlen(root); data/kore-4.0.1/src/filemap.c:113:22: [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). entry->ondisk_len = strlen(path); data/kore-4.0.1/src/filemap.c:132: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). entry->ondisk_len = strlen(rpath); data/kore-4.0.1/src/filemap.c:289: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 (req->path[strlen(req->path) - 1] != '/') { data/kore-4.0.1/src/http.c:990: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(arg); data/kore-4.0.1/src/http.c:1071:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(file->req->http_body_fd, buf, toread); data/kore-4.0.1/src/http.c:1342:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(req->http_body_fd, out, toread); data/kore-4.0.1/src/http.c:1551: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). req->query_string, strlen(req->query_string)); data/kore-4.0.1/src/http.c:1600:17: [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 ((hostlen = strlen(host)) >= KORE_DOMAINNAME_LEN - 1) { data/kore-4.0.1/src/http.c:1605:17: [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 ((pathlen = strlen(path)) >= HTTP_URI_LEN - 1) { data/kore-4.0.1/src/http.c:1885:7: [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 (strlen(val) < 3) data/kore-4.0.1/src/http.c:1908: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). if (strlen(fname) > 0) { data/kore-4.0.1/src/jsonrpc.c:142:7: [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 (strlen(error_buffer)) { data/kore-4.0.1/src/jsonrpc.c:254:4: [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). strlen(id_str)); data/kore-4.0.1/src/jsonrpc.c:315:34: [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). (unsigned char *)log->msg, strlen(log->msg)))) data/kore-4.0.1/src/jsonrpc.c:352: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). (const unsigned char *)message, strlen(message)))) data/kore-4.0.1/src/keymgr.c:80:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). KORE_SYSCALL_ALLOW(read), data/kore-4.0.1/src/keymgr.c:152:21: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). KORE_SYSCALL_ALLOW(umask), data/kore-4.0.1/src/keymgr.c:481:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, sizeof(buf)); data/kore-4.0.1/src/keymgr.c:781:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(S_IWGRP | S_IWOTH | S_IRGRP | S_IROTH); data/kore-4.0.1/src/keymgr.c:813:57: [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). kore_msg_send(KORE_WORKER_ACME, KORE_ACME_RSAKEY_E, e, strlen(e)); data/kore-4.0.1/src/keymgr.c:814:57: [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). kore_msg_send(KORE_WORKER_ACME, KORE_ACME_RSAKEY_N, n, strlen(n)); data/kore-4.0.1/src/keymgr.c:891:22: [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). order->domain, strlen(order->domain)); data/kore-4.0.1/src/keymgr.c:1021:29: [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). kore_buf_append(&buf, b64, strlen(b64)); data/kore-4.0.1/src/kore.c:802: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). proctitle_maxlen += strlen(environ[i]) + 1; data/kore-4.0.1/src/kore.c:807: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). proctitle_maxlen += strlen(kore_argv[i]) + 1; data/kore-4.0.1/src/mem.c:203: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) + 1; data/kore-4.0.1/src/net.c:295:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!c->read(c, &r)) data/kore-4.0.1/src/python.c:3264:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(op->socket->fd, op->buffer.data, data/kore-4.0.1/src/python.c:3330: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). len = strlen(op->sendaddr.sun.sun_path); data/kore-4.0.1/src/python.c:3395:10: [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). strlen(op->sendaddr.sun.sun_path); data/kore-4.0.1/src/seccomp.c:57:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). KORE_SYSCALL_ALLOW(read), data/kore-4.0.1/src/tasks.c:315:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(fd, d + offset, len - offset); data/kore-4.0.1/src/utils.c:303: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(in); data/kore-4.0.1/src/utils.c:789: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(in); ANALYSIS SUMMARY: Hits = 264 Lines analyzed = 35169 in approximately 1.26 seconds (27895 lines/second) Physical Source Lines of Code (SLOC) = 26819 Hits@level = [0] 243 [1] 79 [2] 148 [3] 17 [4] 19 [5] 1 Hits@level+ = [0+] 507 [1+] 264 [2+] 185 [3+] 37 [4+] 20 [5+] 1 Hits/KSLOC@level+ = [0+] 18.9045 [1+] 9.84377 [2+] 6.89809 [3+] 1.37962 [4+] 0.74574 [5+] 0.037287 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.