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/intel-cmt-cat-4.0/examples/c/CAT_MBA/allocation_app_l2cat.c Examining data/intel-cmt-cat-4.0/examples/c/CAT_MBA/allocation_app_l3cat.c Examining data/intel-cmt-cat-4.0/examples/c/CAT_MBA/allocation_app_mba.c Examining data/intel-cmt-cat-4.0/examples/c/CAT_MBA/association_app.c Examining data/intel-cmt-cat-4.0/examples/c/CAT_MBA/reset_app.c Examining data/intel-cmt-cat-4.0/examples/c/CMT_MBM/monitor_app.c Examining data/intel-cmt-cat-4.0/examples/c/PSEUDO_LOCK/dlock.c Examining data/intel-cmt-cat-4.0/examples/c/PSEUDO_LOCK/dlock.h Examining data/intel-cmt-cat-4.0/examples/c/PSEUDO_LOCK/pseudo_lock.c Examining data/intel-cmt-cat-4.0/examples/c/PSEUDO_LOCK/tsc.c Examining data/intel-cmt-cat-4.0/examples/c/PSEUDO_LOCK/tsc.h Examining data/intel-cmt-cat-4.0/lib/allocation.c Examining data/intel-cmt-cat-4.0/lib/allocation.h Examining data/intel-cmt-cat-4.0/lib/api.c Examining data/intel-cmt-cat-4.0/lib/api.h Examining data/intel-cmt-cat-4.0/lib/cap.c Examining data/intel-cmt-cat-4.0/lib/cap.h Examining data/intel-cmt-cat-4.0/lib/common.c Examining data/intel-cmt-cat-4.0/lib/common.h Examining data/intel-cmt-cat-4.0/lib/cpu_registers.h Examining data/intel-cmt-cat-4.0/lib/cpuinfo.c Examining data/intel-cmt-cat-4.0/lib/cpuinfo.h Examining data/intel-cmt-cat-4.0/lib/hw_cap.c Examining data/intel-cmt-cat-4.0/lib/hw_cap.h Examining data/intel-cmt-cat-4.0/lib/hw_monitoring.c Examining data/intel-cmt-cat-4.0/lib/hw_monitoring.h Examining data/intel-cmt-cat-4.0/lib/log.c Examining data/intel-cmt-cat-4.0/lib/log.h Examining data/intel-cmt-cat-4.0/lib/machine.c Examining data/intel-cmt-cat-4.0/lib/machine.h Examining data/intel-cmt-cat-4.0/lib/monitoring.c Examining data/intel-cmt-cat-4.0/lib/monitoring.h Examining data/intel-cmt-cat-4.0/lib/os_allocation.c Examining data/intel-cmt-cat-4.0/lib/os_allocation.h Examining data/intel-cmt-cat-4.0/lib/os_cap.c Examining data/intel-cmt-cat-4.0/lib/os_cap.h Examining data/intel-cmt-cat-4.0/lib/os_monitoring.c Examining data/intel-cmt-cat-4.0/lib/os_monitoring.h Examining data/intel-cmt-cat-4.0/lib/perf.c Examining data/intel-cmt-cat-4.0/lib/perf.h Examining data/intel-cmt-cat-4.0/lib/perf_monitoring.c Examining data/intel-cmt-cat-4.0/lib/perf_monitoring.h Examining data/intel-cmt-cat-4.0/lib/pqos.h Examining data/intel-cmt-cat-4.0/lib/resctrl.c Examining data/intel-cmt-cat-4.0/lib/resctrl.h Examining data/intel-cmt-cat-4.0/lib/resctrl_alloc.c Examining data/intel-cmt-cat-4.0/lib/resctrl_alloc.h Examining data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c Examining data/intel-cmt-cat-4.0/lib/resctrl_monitoring.h Examining data/intel-cmt-cat-4.0/lib/resctrl_schemata.c Examining data/intel-cmt-cat-4.0/lib/resctrl_schemata.h Examining data/intel-cmt-cat-4.0/lib/resctrl_utils.c Examining data/intel-cmt-cat-4.0/lib/resctrl_utils.h Examining data/intel-cmt-cat-4.0/lib/types.h Examining data/intel-cmt-cat-4.0/lib/utils.c Examining data/intel-cmt-cat-4.0/lib/utils.h Examining data/intel-cmt-cat-4.0/pqos/alloc.c Examining data/intel-cmt-cat-4.0/pqos/alloc.h Examining data/intel-cmt-cat-4.0/pqos/cap.c Examining data/intel-cmt-cat-4.0/pqos/cap.h Examining data/intel-cmt-cat-4.0/pqos/common.c Examining data/intel-cmt-cat-4.0/pqos/common.h Examining data/intel-cmt-cat-4.0/pqos/main.c Examining data/intel-cmt-cat-4.0/pqos/main.h Examining data/intel-cmt-cat-4.0/pqos/monitor.c Examining data/intel-cmt-cat-4.0/pqos/monitor.h Examining data/intel-cmt-cat-4.0/pqos/profiles.c Examining data/intel-cmt-cat-4.0/pqos/profiles.h Examining data/intel-cmt-cat-4.0/rdtset/common.c Examining data/intel-cmt-cat-4.0/rdtset/common.h Examining data/intel-cmt-cat-4.0/rdtset/cpu.c Examining data/intel-cmt-cat-4.0/rdtset/cpu.h Examining data/intel-cmt-cat-4.0/rdtset/mba_sc.c Examining data/intel-cmt-cat-4.0/rdtset/mba_sc.h Examining data/intel-cmt-cat-4.0/rdtset/rdt.c Examining data/intel-cmt-cat-4.0/rdtset/rdt.h Examining data/intel-cmt-cat-4.0/rdtset/rdtset.c Examining data/intel-cmt-cat-4.0/tools/membw/membw.c FINAL RESULTS: data/intel-cmt-cat-4.0/pqos/monitor.c:2189:25: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(core_list, "err", sizeof(core_list) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2307:25: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(core_list, "err", sizeof(core_list) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2413:25: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(core_list, "err", sizeof(core_list) - 1); data/intel-cmt-cat-4.0/examples/c/PSEUDO_LOCK/tsc.c:48:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(p->name, sizeof(p->name) - 1, name, ap); data/intel-cmt-cat-4.0/lib/cap.c:689:20: [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. } else if (access(RESCTRL_PATH "/cpus", F_OK) == 0) data/intel-cmt-cat-4.0/lib/log.c:165:16: [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. size = vsnprintf(ap_buffer, AP_BUFFER_SIZE - 1, str, ap); data/intel-cmt-cat-4.0/lib/os_allocation.c:168:13: [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(RESCTRL_PATH "/cpus", F_OK) != 0) { data/intel-cmt-cat-4.0/lib/os_cap.c:219:13: [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, F_OK) != 0) { data/intel-cmt-cat-4.0/lib/os_cap.c:257:13: [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(RESCTRL_PATH "/cpus", F_OK) != 0) { data/intel-cmt-cat-4.0/lib/os_cap.c:371:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(path, sizeof(path) - 1, PERF_MON_PATH "/events/%s.scale", data/intel-cmt-cat-4.0/lib/os_cap.c:391:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(path, sizeof(path) - 1, PERF_MON_PATH "/events/%s.unit", data/intel-cmt-cat-4.0/lib/os_cap.c:474:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(path, sizeof(path) - 1, PERF_MON_PATH "/events/%s", data/intel-cmt-cat-4.0/lib/os_cap.c:576:13: [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(RESCTRL_PATH_INFO_L3_MON "/num_rmids", F_OK) == 0) { data/intel-cmt-cat-4.0/lib/os_cap.c:737:13: [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(RESCTRL_PATH "/cpus", F_OK) != 0) data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:264:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, buf_size, RESCTRL_PATH); data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:266:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, buf_size, RESCTRL_PATH "/COS%u", class_id); data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:270:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, buf_size, RESCTRL_PATH "/mon_groups/%s", data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:274:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, buf_size, RESCTRL_PATH "/COS%u/mon_groups/%s", data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:1139:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, sizeof(buf), GROUP_NAME_PREFIX "%d-%u", data/intel-cmt-cat-4.0/pqos/cap.c:68:9: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(format, args); data/intel-cmt-cat-4.0/pqos/main.c:750:9: [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. printf(help_printf_short, data/intel-cmt-cat-4.0/pqos/monitor.c:1110:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(path_buf, sizeof(path_buf) - 1, proc_stat_path_fmt, data/intel-cmt-cat-4.0/pqos/monitor.c:2006:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(data, sz_data - 1, format, val); data/intel-cmt-cat-4.0/pqos/monitor.c:2046:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(formatted_val, 15, format, val); data/intel-cmt-cat-4.0/pqos/monitor.c:2092:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(data, sz_data - 1, format, val); data/intel-cmt-cat-4.0/rdtset/common.h:184:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __VA_ARGS__); \ data/intel-cmt-cat-4.0/rdtset/rdtset.c:186:17: [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(argv[0], argv); data/intel-cmt-cat-4.0/tools/membw/membw.c:865:9: [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. printf("Usage: %s -c <cpu> -b <BW [MB/s]> <operation type>\n" data/intel-cmt-cat-4.0/lib/cap.c:611:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. environment = getenv("RDT_IFACE"); data/intel-cmt-cat-4.0/pqos/main.c:830:23: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((cmd = getopt_long(argc, argv, data/intel-cmt-cat-4.0/rdtset/rdtset.c:76:32: [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. const char *sudo_uid = getenv("SUDO_UID"); data/intel-cmt-cat-4.0/rdtset/rdtset.c:77:32: [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. const char *sudo_gid = getenv("SUDO_GID"); data/intel-cmt-cat-4.0/rdtset/rdtset.c:78:33: [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. const char *sudo_user = getenv("SUDO_USER"); data/intel-cmt-cat-4.0/rdtset/rdtset.c:436:23: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt_long(argc, argvopt, "+c:p:r:t:kvIhw", lgopts, data/intel-cmt-cat-4.0/examples/c/CAT_MBA/allocation_app_l2cat.c:108:44: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sel_l2ca_cos_tab[0].class_id = (unsigned)atoi(argv[1]); data/intel-cmt-cat-4.0/examples/c/CAT_MBA/allocation_app_l3cat.c:109:44: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sel_l3ca_cos_tab[0].class_id = (unsigned)atoi(argv[1]); data/intel-cmt-cat-4.0/examples/c/CAT_MBA/allocation_app_mba.c:117:53: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). mba[REQUESTED].class_id = (unsigned)atoi(argv[1]); data/intel-cmt-cat-4.0/examples/c/CAT_MBA/association_app.c:91:44: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). (unsigned) atoi(argv[1]); data/intel-cmt-cat-4.0/examples/c/CAT_MBA/association_app.c:93:44: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). (unsigned) atoi(argv[i+2]); data/intel-cmt-cat-4.0/examples/c/CMT_MBM/monitor_app.c:203:52: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). (unsigned) atoi(argv[num_opts + i]); data/intel-cmt-cat-4.0/examples/c/CMT_MBM/monitor_app.c:213:52: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). (unsigned) atoi(argv[num_opts + i]); data/intel-cmt-cat-4.0/examples/c/PSEUDO_LOCK/dlock.c:186: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. char err_buf[64]; data/intel-cmt-cat-4.0/examples/c/PSEUDO_LOCK/dlock.c:340:17: [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(m_l3cat_cos[i].cos_tab, cos, data/intel-cmt-cat-4.0/examples/c/PSEUDO_LOCK/pseudo_lock.c:338:17: [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[di], &p[si], copy_size); data/intel-cmt-cat-4.0/examples/c/PSEUDO_LOCK/pseudo_lock.c:369:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). core_id = atoi(argv[1]); data/intel-cmt-cat-4.0/examples/c/PSEUDO_LOCK/tsc.h:55: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. char name[128]; data/intel-cmt-cat-4.0/lib/cap.c:156: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). m_apilock = open(lock_filename, O_WRONLY | O_CREAT, data/intel-cmt-cat-4.0/lib/common.c:51:18: [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). stream = fopen(name, mode); data/intel-cmt-cat-4.0/lib/log.c:144: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. char ap_buffer[AP_BUFFER_SIZE]; data/intel-cmt-cat-4.0/lib/machine.c:170:17: [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 fname[32]; data/intel-cmt-cat-4.0/lib/machine.c:179:22: [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(fname, O_RDWR); data/intel-cmt-cat-4.0/lib/os_allocation.c:218:17: [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[128]; data/intel-cmt-cat-4.0/lib/os_allocation.c:280: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. char mon_group[256]; data/intel-cmt-cat-4.0/lib/os_allocation.c:608:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). pid = atoi(pids_list[pid_idx]->d_name); data/intel-cmt-cat-4.0/lib/os_allocation.c:1218: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. char buf[128]; data/intel-cmt-cat-4.0/lib/os_allocation.c:1452: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. char buf[128]; data/intel-cmt-cat-4.0/lib/os_allocation.c:1869: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. char mon_group[256]; data/intel-cmt-cat-4.0/lib/os_cap.c:73: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. char temp[1024]; data/intel-cmt-cat-4.0/lib/os_cap.c:81:22: [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). fd = fopen(fname, "r"); data/intel-cmt-cat-4.0/lib/os_cap.c:115: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. char buf[16] = "\0"; data/intel-cmt-cat-4.0/lib/os_cap.c:157: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. char path[128]; data/intel-cmt-cat-4.0/lib/os_cap.c:182: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. char path[128]; data/intel-cmt-cat-4.0/lib/os_cap.c:212: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. char path[128]; data/intel-cmt-cat-4.0/lib/os_cap.c:360: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. char path[128]; data/intel-cmt-cat-4.0/lib/os_cap.c:361: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. char buf[16]; data/intel-cmt-cat-4.0/lib/os_cap.c:440: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. char path[128]; data/intel-cmt-cat-4.0/lib/os_monitoring.c:541: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. char buf[64]; data/intel-cmt-cat-4.0/lib/os_monitoring.c:559:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). tid = atoi(namelist[0]->d_name); data/intel-cmt-cat-4.0/lib/os_monitoring.c:564:46: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ret = tid_add((pid_t)atoi(namelist[i]->d_name), tid_nr, data/intel-cmt-cat-4.0/lib/os_monitoring.c:589: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. char buf[64]; data/intel-cmt-cat-4.0/lib/perf_monitoring.c:200: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. char file[64], evt[8]; data/intel-cmt-cat-4.0/lib/perf_monitoring.c:284: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. char file[512], buf[32], *p; data/intel-cmt-cat-4.0/lib/perf_monitoring.c:352: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. char dir[64]; data/intel-cmt-cat-4.0/lib/resctrl.c:79:27: [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). resctrl_lock_fd = open(RESCTRL_PATH, O_DIRECTORY); data/intel-cmt-cat-4.0/lib/resctrl.c:152: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. char buf[32] = ""; data/intel-cmt-cat-4.0/lib/resctrl.c:307: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. char cpus[RESCTRL_MAX_CPUS / CHAR_BIT]; data/intel-cmt-cat-4.0/lib/resctrl_alloc.c:141: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. char buf[128]; data/intel-cmt-cat-4.0/lib/resctrl_alloc.c:371: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. char buf[128]; data/intel-cmt-cat-4.0/lib/resctrl_alloc.c:456:17: [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[128]; data/intel-cmt-cat-4.0/lib/resctrl_alloc.c:490: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. char buf[128]; data/intel-cmt-cat-4.0/lib/resctrl_alloc.c:513: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. char name[32]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:108: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. char buf[64]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:298: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. char path[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:334: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. char path[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:372: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. char buf[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:374: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. char path[PATH_MAX]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:511: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. char buf[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:550: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. char path[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:650: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. char dir[256]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:701: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. char path[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:742: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. char buf[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:777: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. char dir[256]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:800:17: [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[256]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:801:17: [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[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:847: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. char path[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:882: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. char name[32]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:931:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dir[256]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:945:25: [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[256]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:1107:49: [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[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:1137:17: [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[32]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:1259:17: [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[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:1308:17: [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[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:1396:17: [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[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:1503:17: [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[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:1602:17: [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[128]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:1677:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dir[256]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:1690:25: [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[256]; data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:1737:17: [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[256]; data/intel-cmt-cat-4.0/pqos/alloc.c:75: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 *alloc_opts[32]; data/intel-cmt-cat-4.0/pqos/cap.c:131: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. char buffer_cache[BUFFER_SIZE] = "\0"; data/intel-cmt-cat-4.0/pqos/cap.c:132: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. char buffer_memory[BUFFER_SIZE] = "\0"; data/intel-cmt-cat-4.0/pqos/cap.c:133: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. char buffer_other[BUFFER_SIZE] = "\0"; data/intel-cmt-cat-4.0/pqos/common.c:50:18: [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). stream = fopen(name, mode); data/intel-cmt-cat-4.0/pqos/common.c:91: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). fd = open(pathname, flags, mode); data/intel-cmt-cat-4.0/pqos/main.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. char cb[256]; data/intel-cmt-cat-4.0/pqos/main.c:1002: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). cfg.fd_log = open(sel_log_file, O_WRONLY|O_CREAT, data/intel-cmt-cat-4.0/pqos/monitor.c:277: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. char buf[16], *str = NULL; data/intel-cmt-cat-4.0/pqos/monitor.c:1105: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. char path_buf[256]; data/intel-cmt-cat-4.0/pqos/monitor.c:1113:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return fopen(path_buf, "r"); data/intel-cmt-cat-4.0/pqos/monitor.c:1159: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. char buf[512];/* line in /proc/PID/stat is quite lengthy*/ data/intel-cmt-cat-4.0/pqos/monitor.c:1237:17: [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 time_str[64]; data/intel-cmt-cat-4.0/pqos/monitor.c:1289: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. char core_s[64]; data/intel-cmt-cat-4.0/pqos/monitor.c:1290: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. char pid_s[64]; data/intel-cmt-cat-4.0/pqos/monitor.c:1353: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. char core[16]; data/intel-cmt-cat-4.0/pqos/monitor.c:2044:17: [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 formatted_val[16]; data/intel-cmt-cat-4.0/pqos/monitor.c:2124: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. char data[sz_data]; data/intel-cmt-cat-4.0/pqos/monitor.c:2126: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. char core_list[PQOS_MAX_CORES * 4]; data/intel-cmt-cat-4.0/pqos/monitor.c:2218: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. char data[sz_data]; data/intel-cmt-cat-4.0/pqos/monitor.c:2219: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. char core_list[PQOS_MAX_CORES * 4]; data/intel-cmt-cat-4.0/pqos/monitor.c:2346: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. char data[sz_data]; data/intel-cmt-cat-4.0/pqos/monitor.c:2347: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. char core_list[PQOS_MAX_CORES]; data/intel-cmt-cat-4.0/pqos/monitor.c:2666: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. char header[sz_header]; data/intel-cmt-cat-4.0/pqos/monitor.c:2728:17: [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 cb_time[64]; data/intel-cmt-cat-4.0/pqos/monitor.c:2738:17: [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(mon_data, mon_grps, mon_number * sizeof(mon_grps[0])); data/intel-cmt-cat-4.0/pqos/profiles.c:376:17: [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 cb[64]; data/intel-cmt-cat-4.0/rdtset/common.c:58:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buff, cpustr, cpustr_len); data/intel-cmt-cat-4.0/rdtset/common.c:137:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cpustr + cpustr_len - 4, "...", 3); data/intel-cmt-cat-4.0/rdtset/cpu.c:103: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. char cpustr[CPU_SETSIZE * 3] = {0}; data/intel-cmt-cat-4.0/rdtset/rdt.c:1978: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. char cpustr[CPU_SETSIZE * 3]; data/intel-cmt-cat-4.0/examples/c/CMT_MBM/monitor_app.c:362:21: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (getchar() != '\n') data/intel-cmt-cat-4.0/lib/common.c:87:16: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. return strncat(dst, src, size - strnlen(dst, size)); data/intel-cmt-cat-4.0/lib/os_allocation.c:580: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). for (char_idx = 0; char_idx < strlen(dir->d_name); ++char_idx) { data/intel-cmt-cat-4.0/lib/perf.c:148:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). res = read(counter_fd, value, sizeof(*value)); data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:279:17: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf, file, buf_size - strlen(buf)); data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:279: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). strncat(buf, file, buf_size - strlen(buf)); data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:681:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, namelist[i]->d_name, name_size); data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:823:33: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, namelist[i]->d_name, name_size); data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:863:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(path, "/tasks", sizeof(path) - strlen(path) - 1); data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:863:48: [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). strncat(path, "/tasks", sizeof(path) - strlen(path) - 1); data/intel-cmt-cat-4.0/lib/resctrl_monitoring.c:969:33: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(grp->name, grp_name, sizeof(grp->name)); data/intel-cmt-cat-4.0/pqos/alloc.c:702: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). str += strlen("llc:"); data/intel-cmt-cat-4.0/pqos/alloc.c:704: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). str += strlen("core:"); data/intel-cmt-cat-4.0/pqos/alloc.c:779: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). str += strlen("pid:"); data/intel-cmt-cat-4.0/pqos/cap.c:168: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). snprintf(buffer + strlen(buffer), BUFFER_SIZE - strlen(buffer), data/intel-cmt-cat-4.0/pqos/cap.c:168: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). snprintf(buffer + strlen(buffer), BUFFER_SIZE - strlen(buffer), data/intel-cmt-cat-4.0/pqos/cap.c:174:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(buffer + strlen(buffer), data/intel-cmt-cat-4.0/pqos/cap.c:175:56: [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). BUFFER_SIZE - strlen(buffer), data/intel-cmt-cat-4.0/pqos/cap.c:179:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(buffer + strlen(buffer), data/intel-cmt-cat-4.0/pqos/cap.c:180:56: [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). BUFFER_SIZE - strlen(buffer), data/intel-cmt-cat-4.0/pqos/cap.c:184:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(buffer + strlen(buffer), data/intel-cmt-cat-4.0/pqos/cap.c:185:56: [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). BUFFER_SIZE - strlen(buffer), data/intel-cmt-cat-4.0/pqos/cap.c:194: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 (strlen(buffer_cache) > 0) { data/intel-cmt-cat-4.0/pqos/cap.c:200: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 (strlen(buffer_memory) > 0) { data/intel-cmt-cat-4.0/pqos/cap.c:206: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 (strlen(buffer_other) > 0) { data/intel-cmt-cat-4.0/pqos/main.c:590: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). if (strlen(cb+j) == 0) data/intel-cmt-cat-4.0/pqos/main.c:597:31: [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). remain = (int)strlen(cp); data/intel-cmt-cat-4.0/pqos/main.c:602:31: [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). for (i = (int)strlen(cp)-1; i > 0; i--) data/intel-cmt-cat-4.0/pqos/main.c:609: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). int len = (int)strlen(optab[i].option); data/intel-cmt-cat-4.0/pqos/monitor.c:1195: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). if (len_val <= (strlen(token)+1)) { data/intel-cmt-cat-4.0/pqos/monitor.c:1198:33: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(val, token, len_val); data/intel-cmt-cat-4.0/pqos/monitor.c:1397:31: [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). cores_s_len = strlen(cores_s); data/intel-cmt-cat-4.0/pqos/monitor.c:1400:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat(cores_s, ",", len - cores_s_len); data/intel-cmt-cat-4.0/pqos/monitor.c:1401:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(cores_s, core, len - cores_s_len - comma_len); data/intel-cmt-cat-4.0/pqos/monitor.c:1403:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(cores_s, core, len - cores_s_len); data/intel-cmt-cat-4.0/pqos/monitor.c:1880:9: [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(PID_CPU_TIME_DELAY_USEC); data/intel-cmt-cat-4.0/pqos/monitor.c:2007:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). offset = strlen(data); data/intel-cmt-cat-4.0/pqos/monitor.c:2012:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(data, blank_column, sz_data - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2013:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). offset = strlen(data); data/intel-cmt-cat-4.0/pqos/monitor.c:2053:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). offset = strlen(data); data/intel-cmt-cat-4.0/pqos/monitor.c:2060:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). offset = strlen(data); data/intel-cmt-cat-4.0/pqos/monitor.c:2093:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). offset = strlen(data); data/intel-cmt-cat-4.0/pqos/monitor.c:2099:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). offset = strlen(data); data/intel-cmt-cat-4.0/pqos/monitor.c:2447:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(hdr, " CORE", sz_hdr - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2450:33: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, " RMID", data/intel-cmt-cat-4.0/pqos/monitor.c:2451: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). sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2454:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(hdr, " PID CORE", sz_hdr - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2457:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, " IPC", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2457:63: [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). strncat(hdr, " IPC", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2459:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, " MISSES", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2459:63: [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). strncat(hdr, " MISSES", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2462:33: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, " LLC[KB]", data/intel-cmt-cat-4.0/pqos/monitor.c:2463: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). sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2465:33: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, " LLC[%]", data/intel-cmt-cat-4.0/pqos/monitor.c:2466: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). sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2469:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, " MBL[MB/s]", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2469:63: [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). strncat(hdr, " MBL[MB/s]", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2471:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, " MBR[MB/s]", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2471:63: [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). strncat(hdr, " MBR[MB/s]", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2473:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, " MBT[MB/s]", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2473:63: [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). strncat(hdr, " MBT[MB/s]", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2478:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(hdr, "Time,Core", sz_hdr - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2481:33: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, ",RMID", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2481:64: [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). strncat(hdr, ",RMID", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2484:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(hdr, "Time,PID,Core", sz_hdr - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2487:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, ",IPC", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2487:55: [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). strncat(hdr, ",IPC", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2489:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, ",LLC Misses", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2489:62: [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). strncat(hdr, ",LLC Misses", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2492:33: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, ",LLC[KB]", data/intel-cmt-cat-4.0/pqos/monitor.c:2493: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). sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2495:33: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, ",LLC[%]", data/intel-cmt-cat-4.0/pqos/monitor.c:2496: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). sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2499:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, ",MBL[MB/s]", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2499:61: [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). strncat(hdr, ",MBL[MB/s]", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2501:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, ",MBR[MB/s]", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2501:61: [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). strncat(hdr, ",MBR[MB/s]", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2503:25: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(hdr, ",MBT[MB/s]", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2503:61: [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). strncat(hdr, ",MBT[MB/s]", sz_hdr - strlen(hdr) - 1); data/intel-cmt-cat-4.0/pqos/monitor.c:2755:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(cb_time, "error", sizeof(cb_time) - 1); data/intel-cmt-cat-4.0/pqos/profiles.c:380:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(cb, "llc:", sizeof(cb)); data/intel-cmt-cat-4.0/pqos/profiles.c:381: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). offset = (unsigned)strlen("llc:"); data/intel-cmt-cat-4.0/pqos/profiles.c:384:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cb+offset, cptr[i], data/intel-cmt-cat-4.0/rdtset/mba_sc.c:484:17: [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(MBA_SC_SAMPLING_INTERVAL * 1000); data/intel-cmt-cat-4.0/rdtset/rdt.c:527: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 (strlen(feature) > 1) { data/intel-cmt-cat-4.0/rdtset/rdt.c:551: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). const unsigned min_len_group = strlen("3=f"); data/intel-cmt-cat-4.0/rdtset/rdt.c:563: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). if (strlen(group) < min_len_group) { data/intel-cmt-cat-4.0/rdtset/rdt.c:599:52: [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 = str_to_cpuset(param, strlen(param), ANALYSIS SUMMARY: Hits = 227 Lines analyzed = 36331 in approximately 0.94 seconds (38523 lines/second) Physical Source Lines of Code (SLOC) = 20787 Hits@level = [0] 453 [1] 88 [2] 105 [3] 6 [4] 25 [5] 3 Hits@level+ = [0+] 680 [1+] 227 [2+] 139 [3+] 34 [4+] 28 [5+] 3 Hits/KSLOC@level+ = [0+] 32.7128 [1+] 10.9203 [2+] 6.68687 [3+] 1.63564 [4+] 1.347 [5+] 0.144321 Dot directories skipped = 2 (--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.