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/makedumpfile-1.6.7/arch/arm.c Examining data/makedumpfile-1.6.7/arch/arm64.c Examining data/makedumpfile-1.6.7/arch/ia64.c Examining data/makedumpfile-1.6.7/arch/ppc.c Examining data/makedumpfile-1.6.7/arch/ppc64.c Examining data/makedumpfile-1.6.7/arch/s390x.c Examining data/makedumpfile-1.6.7/arch/sparc64.c Examining data/makedumpfile-1.6.7/arch/x86.c Examining data/makedumpfile-1.6.7/arch/x86_64.c Examining data/makedumpfile-1.6.7/cache.c Examining data/makedumpfile-1.6.7/cache.h Examining data/makedumpfile-1.6.7/common.h Examining data/makedumpfile-1.6.7/diskdump_mod.h Examining data/makedumpfile-1.6.7/dwarf_info.c Examining data/makedumpfile-1.6.7/dwarf_info.h Examining data/makedumpfile-1.6.7/elf_info.c Examining data/makedumpfile-1.6.7/elf_info.h Examining data/makedumpfile-1.6.7/eppic_scripts/ap_messages_3_10_to_4_8.c Examining data/makedumpfile-1.6.7/eppic_scripts/dir_names_3_10_to_3_13.c Examining data/makedumpfile-1.6.7/eppic_scripts/dir_names_3_14_to_4_8.c Examining data/makedumpfile-1.6.7/eppic_scripts/keyring_3_10_to_4_3.c Examining data/makedumpfile-1.6.7/eppic_scripts/keyring_4_4_to_4_8.c Examining data/makedumpfile-1.6.7/eppic_scripts/proc_names_3_10_to_4_8.c Examining data/makedumpfile-1.6.7/eppic_scripts/tcp_sk_buf_3_10_to_4_8.c Examining data/makedumpfile-1.6.7/eppic_scripts/udp_sk_buf_3_10_to_4_8.c Examining data/makedumpfile-1.6.7/eppic_scripts/unix_sk_buff_3_10_to_4_8.c Examining data/makedumpfile-1.6.7/eppic_scripts/vhost_net_buffers_3_10_to_3_18.c Examining data/makedumpfile-1.6.7/eppic_scripts/vhost_net_buffers_3_19_to_4_8.c Examining data/makedumpfile-1.6.7/eppic_scripts/vhost_scsi_buffers_3_10_to_4_8.c Examining data/makedumpfile-1.6.7/erase_info.c Examining data/makedumpfile-1.6.7/erase_info.h Examining data/makedumpfile-1.6.7/extension_eppic.c Examining data/makedumpfile-1.6.7/extension_eppic.h Examining data/makedumpfile-1.6.7/print_info.c Examining data/makedumpfile-1.6.7/print_info.h Examining data/makedumpfile-1.6.7/sadump_info.c Examining data/makedumpfile-1.6.7/sadump_info.h Examining data/makedumpfile-1.6.7/sadump_mod.h Examining data/makedumpfile-1.6.7/tools.c Examining data/makedumpfile-1.6.7/makedumpfile.c Examining data/makedumpfile-1.6.7/makedumpfile.h FINAL RESULTS: data/makedumpfile-1.6.7/erase_info.c:284:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(modules->name, module_name); data/makedumpfile-1.6.7/extension_eppic.h:76:3: [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, __FUNCTION__); \ data/makedumpfile-1.6.7/extension_eppic.h:78:3: [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, x); \ data/makedumpfile-1.6.7/makedumpfile.c:1387: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, F_OK) != 0) data/makedumpfile-1.6.7/makedumpfile.c:1390:7: [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, W_OK) == 0) data/makedumpfile-1.6.7/makedumpfile.c:1423:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(info->name_bitmap, tmpname); data/makedumpfile-1.6.7/makedumpfile.c:1425:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(info->name_bitmap, FILENAME_BITMAP); data/makedumpfile-1.6.7/makedumpfile.c:2410:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(info->release, buf + strlen(STR_OSRELEASE)); data/makedumpfile-1.6.7/makedumpfile.c:5222:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. bufp += sprintf(bufp, "\n%-*s", indent_len, ""); data/makedumpfile-1.6.7/makedumpfile.c:6280:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, info->working_dir); data/makedumpfile-1.6.7/makedumpfile.c:6836:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fh.signature, MAKEDUMPFILE_SIGNATURE); data/makedumpfile-1.6.7/makedumpfile.c:8657:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(obuf, "erase %s %s", erase_info[i].symbol_expr, data/makedumpfile-1.6.7/makedumpfile.c:11152:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(buf, "MemFree: %llu %s", &free_size, unit) == 2) { data/makedumpfile-1.6.7/print_info.h:59:4: [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, x); \ data/makedumpfile-1.6.7/print_info.h:61:4: [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(stdout, x); \ data/makedumpfile-1.6.7/print_info.h:68:3: [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, __FUNCTION__); \ data/makedumpfile-1.6.7/print_info.h:70:3: [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, x); \ data/makedumpfile-1.6.7/print_info.h:77:3: [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, x); \ data/makedumpfile-1.6.7/print_info.h:85:4: [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, x); \ data/makedumpfile-1.6.7/print_info.h:87:4: [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(stdout, x); \ data/makedumpfile-1.6.7/print_info.h:95:4: [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, x); \ data/makedumpfile-1.6.7/print_info.h:97:4: [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(stdout, x); \ data/makedumpfile-1.6.7/tools.c:285:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, line); data/makedumpfile-1.6.7/tools.c:289:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(line, p); data/makedumpfile-1.6.7/arch/s390x.c:88:19: [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. char *term_str = getenv("TERM"); data/makedumpfile-1.6.7/makedumpfile.c:1411:12: [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. tmpname = getenv("TMPDIR"); data/makedumpfile-1.6.7/makedumpfile.c:11471:16: [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, argv, "b:cDd:eEFfg:hi:lpRvXx:", longopts, data/makedumpfile-1.6.7/arch/arm64.c:213: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[BUFSIZE]; data/makedumpfile-1.6.7/arch/arm64.c:214: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 *kallsyms[MAXARGS]; data/makedumpfile-1.6.7/arch/arm64.c:223: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("/proc/kallsyms", "r")) == NULL) { data/makedumpfile-1.6.7/arch/ppc64.c:654:7: [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). fp = fopen(f_crashsize, "r"); data/makedumpfile-1.6.7/arch/ppc64.c:659:8: [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). fpb = fopen(f_crashbase, "r"); data/makedumpfile-1.6.7/arch/x86_64.c:50:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZE_FGETS], *endp; data/makedumpfile-1.6.7/diskdump_mod.h:36: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 sysname[65]; data/makedumpfile-1.6.7/diskdump_mod.h:37: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 nodename[65]; data/makedumpfile-1.6.7/diskdump_mod.h:38: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 release[65]; data/makedumpfile-1.6.7/diskdump_mod.h:39: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 version[65]; data/makedumpfile-1.6.7/diskdump_mod.h:40: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 machine[65]; data/makedumpfile-1.6.7/diskdump_mod.h:41: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 domainname[65]; data/makedumpfile-1.6.7/diskdump_mod.h:45:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char signature[SIG_LEN]; /* = "KDUMP " */ data/makedumpfile-1.6.7/dwarf_info.c: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 src_name[LEN_SRCFILE]; /* OUT */ data/makedumpfile-1.6.7/dwarf_info.c:300:4: [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). open(dwarf_info.name_debuginfo, O_RDONLY); data/makedumpfile-1.6.7/elf_info.c:283: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[VMCOREINFO_XEN_NOTE_NAME_BYTES]; data/makedumpfile-1.6.7/elf_info.c:284: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 note[MAX_SIZE_NHDR]; data/makedumpfile-1.6.7/elf_info.c:374: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 note[MAX_SIZE_NHDR]; data/makedumpfile-1.6.7/erase_info.c:137: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 config_buf[BUFSIZE_FGETS]; data/makedumpfile-1.6.7/erase_info.c:1053: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[BUFSIZE + 1]; data/makedumpfile-1.6.7/erase_info.c:1835:33: [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 ((info->file_filterconfig = fopen(name_config, "r")) == NULL) { data/makedumpfile-1.6.7/erase_info.c:2448: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 size_str[MAX_SIZE_STR_LEN]; data/makedumpfile-1.6.7/erase_info.c:2458:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(size_str, "nullify\n"); data/makedumpfile-1.6.7/erase_info.c:2460:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(size_str, "size %ld\n", fl_info->size); data/makedumpfile-1.6.7/extension_eppic.c:56: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 fname[MAX_SYMNAMELEN]; data/makedumpfile-1.6.7/makedumpfile.c:814: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[info->page_size], *rdbuf; data/makedumpfile-1.6.7/makedumpfile.c:892: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[info->page_size], *rdbuf; data/makedumpfile-1.6.7/makedumpfile.c:1040: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(bufptr, pgbuf + PAGEOFFSET(paddr), read_size); data/makedumpfile-1.6.7/makedumpfile.c:1196:25: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((file_vmcoreinfo = fopen(info->name_vmcoreinfo, mode)) == NULL) { data/makedumpfile-1.6.7/makedumpfile.c:1211: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(info->name_vmlinux, O_RDONLY)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:1219: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(info->name_xen_syms, O_RDONLY)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:1291: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(info->dh_memory, &dh, sizeof(dh)); data/makedumpfile-1.6.7/makedumpfile.c:1292: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(&info->timestamp, &dh.timestamp, sizeof(dh.timestamp)); data/makedumpfile-1.6.7/makedumpfile.c:1300:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(info->kh_memory, &kh, sizeof(kh)); data/makedumpfile-1.6.7/makedumpfile.c:1337: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(info->name_memory, O_RDONLY)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:1372:19: [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). } else if ((fd = open(info->name_dumpfile, open_flags, data/makedumpfile-1.6.7/makedumpfile.c:1426: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(info->name_bitmap)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:1441: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(info->name_bitmap, O_RDONLY)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:1457: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(info->name_bitmap, O_RDONLY)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:2387: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[BUFSIZE_FGETS], *endp; data/makedumpfile-1.6.7/makedumpfile.c:2461: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[BUFSIZE_FGETS], *endp; data/makedumpfile-1.6.7/makedumpfile.c:2494: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[BUFSIZE_FGETS], *endp; data/makedumpfile-1.6.7/makedumpfile.c:2528: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[BUFSIZE_FGETS], *endp; data/makedumpfile-1.6.7/makedumpfile.c:2561: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[BUFSIZE_FGETS]; data/makedumpfile-1.6.7/makedumpfile.c:2748: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[VMCOREINFO_BYTES]; data/makedumpfile-1.6.7/makedumpfile.c:2754: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(info->name_vmcoreinfo)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:3512: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(mem_maps, mem_maps_ex, mem_maps_size); data/makedumpfile-1.6.7/makedumpfile.c:3858:32: [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_MEMORY_PARALLEL(i) = open(info->name_memory, O_RDONLY)) data/makedumpfile-1.6.7/makedumpfile.c:3866:5: [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). open(info->name_memory, O_RDONLY)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:3952: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[BUFSIZE_FGETS], *endp; data/makedumpfile-1.6.7/makedumpfile.c:4683: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(cd->buf + cd->buf_size, buf, size); data/makedumpfile-1.6.7/makedumpfile.c:4694: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(cd->buf, cd->buf + cd->cache_size, cd->buf_size); data/makedumpfile-1.6.7/makedumpfile.c:4764: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[MAX_SIZE_MDF_HEADER]; data/makedumpfile-1.6.7/makedumpfile.c:4885: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(filename, O_RDWR)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:4933: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(filename, O_RDWR)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:5008: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[SIZE_BUF_STDIN]; data/makedumpfile-1.6.7/makedumpfile.c:5195: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[BUFSIZE]; data/makedumpfile-1.6.7/makedumpfile.c:5208:10: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. bufp += sprintf(buf, "[%5lld.%06ld] ", nanos, rem/1000); data/makedumpfile-1.6.7/makedumpfile.c:5226:12: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. bufp += sprintf(bufp, "\\x%02x", *p); data/makedumpfile-1.6.7/makedumpfile.c:5641: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[info->dh_memory->block_size]; data/makedumpfile-1.6.7/makedumpfile.c:5682: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[info->page_size]; data/makedumpfile-1.6.7/makedumpfile.c:5803:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[info->page_size]; data/makedumpfile-1.6.7/makedumpfile.c:5939:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char page_cache[SIZE(page) * PGMM_CACHED]; data/makedumpfile-1.6.7/makedumpfile.c:6209: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(info->bitmap2->buf, info->bitmap1->buf, data/makedumpfile-1.6.7/makedumpfile.c:6218:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[info->page_size]; data/makedumpfile-1.6.7/makedumpfile.c:6282:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename, "makedumpfilepfns"); data/makedumpfile-1.6.7/makedumpfile.c:6285:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((sc.sc_fd = open(sc.sc_filename, flags, S_IRUSR|S_IWUSR)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:6830: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[MAX_SIZE_MDF_HEADER]; data/makedumpfile-1.6.7/makedumpfile.c:6851: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, &fh, sizeof(fh)); data/makedumpfile-1.6.7/makedumpfile.c:7124: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(dh->signature, KDUMP_SIGNATURE, strlen(KDUMP_SIGNATURE)); data/makedumpfile-1.6.7/makedumpfile.c:7486: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[info->page_size]; data/makedumpfile-1.6.7/makedumpfile.c:7557:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, mapbuf, info->page_size); data/makedumpfile-1.6.7/makedumpfile.c:8110:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(page_data_buf[index].buf, buf_out, size_out); data/makedumpfile-1.6.7/makedumpfile.c:8123:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(page_data_buf[index].buf, buf_out, size_out); data/makedumpfile-1.6.7/makedumpfile.c:8138:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(page_data_buf[index].buf, buf_out, size_out); data/makedumpfile-1.6.7/makedumpfile.c:8143:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(page_data_buf[index].buf, buf, info->page_size); data/makedumpfile-1.6.7/makedumpfile.c:8406:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[info->page_size], *buf_out = NULL; data/makedumpfile-1.6.7/makedumpfile.c:8626: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 size_str[MAX_SIZE_STR_LEN]; data/makedumpfile-1.6.7/makedumpfile.c:8633:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(size_str, "size %ld\n", data/makedumpfile-1.6.7/makedumpfile.c:8636:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(size_str, "nullify\n"); data/makedumpfile-1.6.7/makedumpfile.c:8683: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 note[MAX_SIZE_NHDR]; data/makedumpfile-1.6.7/makedumpfile.c:8684: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[ERASEINFO_NOTE_NAME_BYTES + 4]; data/makedumpfile-1.6.7/makedumpfile.c:8722: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, ERASEINFO_NOTE_NAME, ERASEINFO_NOTE_NAME_BYTES); data/makedumpfile-1.6.7/makedumpfile.c:8915:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[info->page_size]; data/makedumpfile-1.6.7/makedumpfile.c:9482: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[BUFSIZE_FGETS], *endp; data/makedumpfile-1.6.7/makedumpfile.c:10102:25: [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 ((info->fd_memory = open(info->name_memory, O_RDONLY)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:10283: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(filename, O_RDONLY)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:10332: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(filename, O_RDONLY)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:10367: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(&dh, &tmp_dh, sizeof(tmp_dh)); data/makedumpfile-1.6.7/makedumpfile.c:10584: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(&info->sub_header, &kh, sizeof(kh)); data/makedumpfile-1.6.7/makedumpfile.c:10586: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(SPLITTING_DUMPFILE(0), O_RDONLY)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:10745: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(SPLITTING_DUMPFILE(i), O_RDONLY)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:10826: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(SPLITTING_DUMPFILE(i), O_RDONLY)) < 0) { data/makedumpfile-1.6.7/makedumpfile.c:11111:7: [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). i = atoi(ptr); data/makedumpfile-1.6.7/makedumpfile.c:11140: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[BUFSIZE_FGETS]; data/makedumpfile-1.6.7/makedumpfile.c:11141: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 unit[4]; data/makedumpfile-1.6.7/makedumpfile.c:11146: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). if ((file_meminfo = fopen(name_meminfo, "r")) == NULL) { data/makedumpfile-1.6.7/makedumpfile.c:11246: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 line[BUFSIZE_FGETS]; data/makedumpfile-1.6.7/makedumpfile.c:11254:7: [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). fp = fopen(iomem, "r"); data/makedumpfile-1.6.7/makedumpfile.c:11320: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 line[BUFSIZE_FGETS]; data/makedumpfile-1.6.7/makedumpfile.c:11328: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("/sys/kernel/vmcoreinfo", "r"))) data/makedumpfile-1.6.7/makedumpfile.c:11475:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). info->block_order = atoi(optarg); data/makedumpfile-1.6.7/makedumpfile.c:11528:20: [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). message_level = atoi(optarg); data/makedumpfile-1.6.7/makedumpfile.c:11580:27: [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). info->bufsize_cyclic = atoi(optarg); data/makedumpfile-1.6.7/makedumpfile.c:11583:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). info->splitblock_size = atoi(optarg); data/makedumpfile-1.6.7/makedumpfile.c:11589:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). info->num_threads = MAX(atoi(optarg), 0); data/makedumpfile-1.6.7/makedumpfile.h:1248: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 signature[SIG_LEN_MDF]; /* = "makedumpfile" */ data/makedumpfile-1.6.7/makedumpfile.h:1439: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 release[STRLEN_OSRELEASE]; data/makedumpfile-1.6.7/makedumpfile.h:1576: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[MOD_NAME_LEN]; data/makedumpfile-1.6.7/makedumpfile.h:1949: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 pud_t[LEN_SRCFILE]; data/makedumpfile-1.6.7/makedumpfile.h:2278: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 pad1[72]; data/makedumpfile-1.6.7/makedumpfile.h:2280: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 pad2[4]; data/makedumpfile-1.6.7/makedumpfile.h:2318: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 pad1[112]; data/makedumpfile-1.6.7/makedumpfile.h:2320: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 pad2[4]; data/makedumpfile-1.6.7/print_info.c:359:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(msg, "eta: "); data/makedumpfile-1.6.7/print_info.c:362:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg, "%lus", secs); data/makedumpfile-1.6.7/print_info.c:364:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg, "%lum%lus", secs / 60, secs % 60); data/makedumpfile-1.6.7/print_info.c:366:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg, "%luh%lum", secs / 3600, (secs / 60) % 60); data/makedumpfile-1.6.7/print_info.c:368:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg, "%lud%luh", secs / 86400, (secs / 3600) % 24); data/makedumpfile-1.6.7/print_info.c:370:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg, ">2day"); data/makedumpfile-1.6.7/print_info.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 eta_msg[16] = " "; data/makedumpfile-1.6.7/sadump_info.c:183:9: [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). open(sdi->name_memory, O_RDONLY)) < 0) { data/makedumpfile-1.6.7/sadump_info.c:217: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[si->sh_memory->block_size]; data/makedumpfile-1.6.7/sadump_info.c:337:32: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (!(info->file_vmcoreinfo = tmpfile())) { data/makedumpfile-1.6.7/sadump_info.c:359:28: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (!(si->file_elf_note = tmpfile())) { data/makedumpfile-1.6.7/sadump_info.c:502: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 guid[SADUMP_EFI_GUID_TEXT_REPR_LEN+1]; data/makedumpfile-1.6.7/sadump_info.c:749: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 guid[SADUMP_EFI_GUID_TEXT_REPR_LEN+1]; data/makedumpfile-1.6.7/sadump_info.c:1108: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 cmdline[BUFSIZE], *ptr; data/makedumpfile-1.6.7/sadump_info.c:1165:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char e_ident[EI_NIDENT]; data/makedumpfile-1.6.7/sadump_info.c:1200: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 name[16]; data/makedumpfile-1.6.7/sadump_info.c:1451: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[BUFSIZE]; data/makedumpfile-1.6.7/sadump_info.c:1873: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 note_buf[KEXEC_NOTE_BYTES], zero_buf[KEXEC_NOTE_BYTES]; data/makedumpfile-1.6.7/sadump_info.c:1907: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(prstatus_buf, prstatus_ptr, SIZE(elf_prstatus)); data/makedumpfile-1.6.7/sadump_info.c:2368:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[BUFSIZE]; data/makedumpfile-1.6.7/sadump_info.c:2397: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 e_ident[EI_NIDENT]; data/makedumpfile-1.6.7/sadump_mod.h:89: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 signature[8]; /* = "sadump\0\0" */ data/makedumpfile-1.6.7/sadump_mod.h:177: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 reserve[4044]; // reserve feild data/makedumpfile-1.6.7/tools.c:279: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[BUFSIZE]; data/makedumpfile-1.6.7/tools.c:469:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%ld", val); data/makedumpfile-1.6.7/tools.c:475:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, "st"); data/makedumpfile-1.6.7/tools.c:478:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, "nd"); data/makedumpfile-1.6.7/tools.c:481:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, "rd"); data/makedumpfile-1.6.7/tools.c:484:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, "th"); data/makedumpfile-1.6.7/arch/ia64.c:76: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). || !strncmp(SRCFILE(pud_t), STR_PUD_T_4L, strlen(STR_PUD_T_4L))) { data/makedumpfile-1.6.7/arch/ia64.c:80: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). || !strncmp(SRCFILE(pud_t), STR_PUD_T_3L, strlen(STR_PUD_T_3L))) { data/makedumpfile-1.6.7/arch/x86_64.c:61: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). i = strlen(buf); data/makedumpfile-1.6.7/arch/x86_64.c:67: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). strlen(STR_KERNELOFFSET)) == 0) data/makedumpfile-1.6.7/arch/x86_64.c:69: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). strtoul(buf+strlen(STR_KERNELOFFSET),&endp,16); data/makedumpfile-1.6.7/dwarf_info.c:755:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dwarf_info.src_name, src_name, LEN_SRCFILE-1); data/makedumpfile-1.6.7/dwarf_info.c:1311:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(src_name, dwarf_info.src_name, LEN_SRCFILE); data/makedumpfile-1.6.7/elf_info.c:111:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &ehdr64, sizeof(Elf64_Ehdr)) != sizeof(Elf64_Ehdr)) { data/makedumpfile-1.6.7/elf_info.c:119:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &ehdr32, sizeof(Elf32_Ehdr)) != sizeof(Elf32_Ehdr)) { data/makedumpfile-1.6.7/elf_info.c:294:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd_memory, note, sizeof(note)) != sizeof(note)) { data/makedumpfile-1.6.7/elf_info.c:308:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd_memory, &buf, sizeof(buf)) != sizeof(buf)) { data/makedumpfile-1.6.7/elf_info.c:402:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd_memory, note, MAX_SIZE_NHDR) != MAX_SIZE_NHDR) { data/makedumpfile-1.6.7/elf_info.c:430:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, phdr, sizeof(Elf64_Phdr)) != sizeof(Elf64_Phdr)) { data/makedumpfile-1.6.7/elf_info.c:448:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, phdr, sizeof(Elf32_Phdr)) != sizeof(Elf32_Phdr)) { data/makedumpfile-1.6.7/elf_info.c:733:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, ehdr, sizeof(Elf64_Ehdr)) != sizeof(Elf64_Ehdr)) { data/makedumpfile-1.6.7/elf_info.c:751:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, ehdr, sizeof(Elf32_Ehdr)) != sizeof(Elf32_Ehdr)) { data/makedumpfile-1.6.7/elf_info.c:1056:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &shdr, ehdr->e_shentsize) != ehdr->e_shentsize) { data/makedumpfile-1.6.7/erase_info.c:283: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(module_name) < MOD_NAME_LEN) data/makedumpfile-1.6.7/erase_info.c:286:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(modules->name, module_name, MOD_NAME_LEN-1); data/makedumpfile-1.6.7/erase_info.c:393: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(nameptr)) data/makedumpfile-1.6.7/erase_info.c:528: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(cur)) { data/makedumpfile-1.6.7/erase_info.c:906: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). if (!strlen(lh_member)) { data/makedumpfile-1.6.7/erase_info.c:918: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(s_name)) { data/makedumpfile-1.6.7/erase_info.c:1062: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(buf); data/makedumpfile-1.6.7/erase_info.c:2462: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). size_eraseinfo += strlen("erase ") + data/makedumpfile-1.6.7/erase_info.c:2463:5: [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(ei->symbol_expr) + 1 + data/makedumpfile-1.6.7/erase_info.c:2464:5: [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(size_str); data/makedumpfile-1.6.7/makedumpfile.c:376:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(info->fd_memory, pd, sizeof(*pd)) != sizeof(*pd)) { data/makedumpfile-1.6.7/makedumpfile.c:420:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd_memory, pd, sizeof(*pd)) != sizeof(*pd)) { data/makedumpfile-1.6.7/makedumpfile.c:650:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(info->fd_memory, bufptr, size) != size) { data/makedumpfile-1.6.7/makedumpfile.c:671:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd_memory, bufptr, size) != size) { data/makedumpfile-1.6.7/makedumpfile.c:840:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(info->fd_memory, rdbuf, pd.size) != pd.size) { data/makedumpfile-1.6.7/makedumpfile.c:919:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd_memory, rdbuf, pd.size) != pd.size) { data/makedumpfile-1.6.7/makedumpfile.c:1418: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). strlen(tmpname) + 1)) == NULL) { data/makedumpfile-1.6.7/makedumpfile.c:1424:2: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(info->name_bitmap, "/"); data/makedumpfile-1.6.7/makedumpfile.c:2097:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &system_utsname, sizeof system_utsname) data/makedumpfile-1.6.7/makedumpfile.c:2102:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). if (!strncpy(info->release, system_utsname.release, STRLEN_OSRELEASE)){ data/makedumpfile-1.6.7/makedumpfile.c:2398: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). i = strlen(buf); data/makedumpfile-1.6.7/makedumpfile.c:2405: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 (strncmp(buf, STR_OSRELEASE, strlen(STR_OSRELEASE)) == 0) { data/makedumpfile-1.6.7/makedumpfile.c:2408: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(info->release)) data/makedumpfile-1.6.7/makedumpfile.c:2410: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). strcpy(info->release, buf + strlen(STR_OSRELEASE)); data/makedumpfile-1.6.7/makedumpfile.c:2412: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). if (strncmp(buf, STR_PAGESIZE, strlen(STR_PAGESIZE)) == 0) { data/makedumpfile-1.6.7/makedumpfile.c:2413: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). page_size = strtol(buf+strlen(STR_PAGESIZE),&endp,10); data/makedumpfile-1.6.7/makedumpfile.c:2415:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). || strlen(endp) != 0) { data/makedumpfile-1.6.7/makedumpfile.c:2426: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 (strncmp(buf, STR_CRASHTIME, strlen(STR_CRASHTIME)) == 0) { data/makedumpfile-1.6.7/makedumpfile.c:2427: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). tv_sec = strtol(buf+strlen(STR_CRASHTIME),&endp,10); data/makedumpfile-1.6.7/makedumpfile.c:2429:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). || strlen(endp) != 0) { data/makedumpfile-1.6.7/makedumpfile.c:2437: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). strlen(STR_CONFIG_X86_PAE)) == 0) data/makedumpfile-1.6.7/makedumpfile.c:2441: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). strlen(STR_CONFIG_PGTABLE_3)) == 0) data/makedumpfile-1.6.7/makedumpfile.c:2445: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). strlen(STR_CONFIG_PGTABLE_4)) == 0) data/makedumpfile-1.6.7/makedumpfile.c:2471: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). i = strlen(buf); data/makedumpfile-1.6.7/makedumpfile.c:2476: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). if (strncmp(buf, str_symbol, strlen(str_symbol)) == 0) { data/makedumpfile-1.6.7/makedumpfile.c:2477: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). symbol = strtoul(buf + strlen(str_symbol), &endp, 16); data/makedumpfile-1.6.7/makedumpfile.c:2479:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). || strlen(endp) != 0) { data/makedumpfile-1.6.7/makedumpfile.c:2504: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). i = strlen(buf); data/makedumpfile-1.6.7/makedumpfile.c:2509: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 (strncmp(buf, str_structure, strlen(str_structure)) == 0) { data/makedumpfile-1.6.7/makedumpfile.c:2510: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). data = strtoul(buf + strlen(str_structure), &endp, 10); data/makedumpfile-1.6.7/makedumpfile.c:2511: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(endp) != 0) data/makedumpfile-1.6.7/makedumpfile.c:2512: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). data = strtoul(buf + strlen(str_structure), &endp, 16); data/makedumpfile-1.6.7/makedumpfile.c:2513: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). if ((data == LONG_MAX) || strlen(endp) != 0) { data/makedumpfile-1.6.7/makedumpfile.c:2538: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). i = strlen(buf); data/makedumpfile-1.6.7/makedumpfile.c:2543: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 (strncmp(buf, str_structure, strlen(str_structure)) == 0) { data/makedumpfile-1.6.7/makedumpfile.c:2544: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). data = strtol(buf + strlen(str_structure), &endp, 10); data/makedumpfile-1.6.7/makedumpfile.c:2545: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(endp) != 0) data/makedumpfile-1.6.7/makedumpfile.c:2546: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). data = strtol(buf + strlen(str_structure), &endp, 16); data/makedumpfile-1.6.7/makedumpfile.c:2547: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). if ((data == LONG_MAX) || strlen(endp) != 0) { data/makedumpfile-1.6.7/makedumpfile.c:2571: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). i = strlen(buf); data/makedumpfile-1.6.7/makedumpfile.c:2576: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). if (strncmp(buf, str_in, strlen(str_in)) == 0) { data/makedumpfile-1.6.7/makedumpfile.c:2577:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str_out, buf + strlen(str_in), LEN_SRCFILE - strlen(str_in)); data/makedumpfile-1.6.7/makedumpfile.c:2577: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). strncpy(str_out, buf + strlen(str_in), LEN_SRCFILE - strlen(str_in)); data/makedumpfile-1.6.7/makedumpfile.c:2577: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). strncpy(str_out, buf + strlen(str_in), LEN_SRCFILE - strlen(str_in)); data/makedumpfile-1.6.7/makedumpfile.c:2764:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(info->fd_memory, &buf, size) != size) { data/makedumpfile-1.6.7/makedumpfile.c:3964: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). i = strlen(buf); data/makedumpfile-1.6.7/makedumpfile.c:3970: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). strlen(STR_KERNELOFFSET)) == 0) { data/makedumpfile-1.6.7/makedumpfile.c:3972: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). strlen(STR_KERNELOFFSET), &endp, 16); data/makedumpfile-1.6.7/makedumpfile.c:4433:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(bitmap->fd, bitmap->buf, BUFSIZE_BITMAP) data/makedumpfile-1.6.7/makedumpfile.c:4605:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(cd->fd, cd->buf, cd->cache_size) != cd->cache_size) { data/makedumpfile-1.6.7/makedumpfile.c:4736:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). tmp_read_size = read(STDIN_FILENO, buf + read_size, data/makedumpfile-1.6.7/makedumpfile.c:5209:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). indent_len = strlen(buf); data/makedumpfile-1.6.7/makedumpfile.c:5661:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(info->fd_memory, buf, sizeof(buf)) != sizeof(buf)) { data/makedumpfile-1.6.7/makedumpfile.c:6237:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, buf, sizeof(buf)) != sizeof(buf)) { data/makedumpfile-1.6.7/makedumpfile.c:6281:2: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(filename, "/"); data/makedumpfile-1.6.7/makedumpfile.c:6344:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(sc.sc_fd, sc.sc_buf, sc.sc_buflen); data/makedumpfile-1.6.7/makedumpfile.c:6435:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(bitmap1->fd, bitmap1->buf, BUFSIZE_BITMAP) != BUFSIZE_BITMAP) { data/makedumpfile-1.6.7/makedumpfile.c:6448:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(bitmap2->fd, bitmap2->buf, BUFSIZE_BITMAP) != BUFSIZE_BITMAP) { data/makedumpfile-1.6.7/makedumpfile.c:7079:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(info->fd_memory, buf, size_note) != size_note) { data/makedumpfile-1.6.7/makedumpfile.c:7124: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). memcpy(dh->signature, KDUMP_SIGNATURE, strlen(KDUMP_SIGNATURE)); data/makedumpfile-1.6.7/makedumpfile.c:7197:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(info->fd_memory, buf, size_note) != size_note) { data/makedumpfile-1.6.7/makedumpfile.c:7506:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(info->fd_memory, buf, bufsz_write) != bufsz_write) { data/makedumpfile-1.6.7/makedumpfile.c:8582:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(info->fd_memory, buf, size) != size) { data/makedumpfile-1.6.7/makedumpfile.c:8639: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). ei_size = strlen("erase ") + data/makedumpfile-1.6.7/makedumpfile.c:8640: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). strlen(erase_info[i].symbol_expr) + 1 + data/makedumpfile-1.6.7/makedumpfile.c:8641: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). strlen(size_str) + data/makedumpfile-1.6.7/makedumpfile.c:8660: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). if (!write_cache(cd_page, obuf, strlen(obuf))) data/makedumpfile-1.6.7/makedumpfile.c:8662: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). size_eraseinfo += strlen(obuf); data/makedumpfile-1.6.7/makedumpfile.c:9215:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(info->fd_memory, buf, size_xen_crash_info) data/makedumpfile-1.6.7/makedumpfile.c:9492: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). i = strlen(buf); data/makedumpfile-1.6.7/makedumpfile.c:9497: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). if (strncmp(buf, STR_PAGESIZE, strlen(STR_PAGESIZE)) == 0) { data/makedumpfile-1.6.7/makedumpfile.c:9498: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). page_size = strtol(buf+strlen(STR_PAGESIZE),&endp,10); data/makedumpfile-1.6.7/makedumpfile.c:9500:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). || strlen(endp) != 0) { data/makedumpfile-1.6.7/makedumpfile.c:10293:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, dh, sizeof(struct disk_dump_header)) data/makedumpfile-1.6.7/makedumpfile.c:10312: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). if (strncmp(dh->signature, KDUMP_SIGNATURE, strlen(KDUMP_SIGNATURE))) { data/makedumpfile-1.6.7/makedumpfile.c:10342:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, kh, sizeof(struct kdump_sub_header)) data/makedumpfile-1.6.7/makedumpfile.c:10510:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(src_fd, buf, size) != size) { data/makedumpfile-1.6.7/makedumpfile.c:10624:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). status = read(fd, buf_bitmap + read_size, info->len_bitmap data/makedumpfile-1.6.7/makedumpfile.c:10767:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &pd, sizeof(pd)) != sizeof(pd)) { data/makedumpfile-1.6.7/makedumpfile.c:10777:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, data, pd.size) != pd.size) { data/makedumpfile-1.6.7/makedumpfile.c:10836:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, data, SPLITTING_SIZE_EI(i)) != data/makedumpfile-1.6.7/makedumpfile.c:11266: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). if (!match || memcmp(str, match, strlen(match)) == 0) { data/makedumpfile-1.6.7/makedumpfile.h:226: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). #define LASTCHAR(s) (s[strlen(s)-1]) data/makedumpfile-1.6.7/makedumpfile.h:254: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). (strncmp((char *)(A), (char *)(B), strlen((char *)(B))) == 0)) data/makedumpfile-1.6.7/makedumpfile.h:447: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(SRCFILE(decl_name))) { \ data/makedumpfile-1.6.7/makedumpfile.h:455: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(SRCFILE(decl_name)) == 0) { \ data/makedumpfile-1.6.7/makedumpfile.h:2216:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rcode = read(bitmap->fd, bitmap->buf, BUFSIZE_BITMAP); data/makedumpfile-1.6.7/print_info.c:360: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). msg += strlen("eta: "); data/makedumpfile-1.6.7/sadump_info.c:146:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rcode = read(bitmap->fd, bitmap->buf, BUFSIZE_BITMAP); data/makedumpfile-1.6.7/sadump_info.c:238:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(info->fd_memory, buf, sizeof(buf)) != sizeof(buf)) { data/makedumpfile-1.6.7/sadump_info.c:313:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(info->release, info->system_utsname.release, data/makedumpfile-1.6.7/sadump_info.c:463:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(info->fd_memory, buf, bytes) != bytes) { data/makedumpfile-1.6.7/sadump_info.c:481:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(sdi->fd_memory, buf, bytes) != bytes) { data/makedumpfile-1.6.7/sadump_info.c:1145: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). ptr += strlen("elfcorehdr="); data/makedumpfile-1.6.7/sadump_info.c:1283: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). *phys_base = strtoull(pos + strlen(STR_NUMBER("phys_base")), NULL, 0); data/makedumpfile-1.6.7/sadump_info.c:1288:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *kaslr_offset = strtoull(pos + strlen(STR_KERNELOFFSET), NULL, 16); data/makedumpfile-1.6.7/sadump_info.c:1462: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). strlen("Linux version")) && STRNEQ(buf, "Linux version")) data/makedumpfile-1.6.7/sadump_info.c:1468: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). strlen("Linux version")) && data/makedumpfile-1.6.7/sadump_info.c:1538:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd_memory, bufptr, info->page_size) != info->page_size) data/makedumpfile-1.6.7/sadump_info.c:1764: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). note32->n_namesz != strlen(name) + 1 || data/makedumpfile-1.6.7/sadump_info.c:1796: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). nhdr.n_namesz = strlen(name) + 1; data/makedumpfile-1.6.7/sadump_info.c:1978:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(info->fd_memory, smram, si->smram_cpu_state_size) != data/makedumpfile-1.6.7/tools.c:69: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 (str == NULL || strlen(str) == 0) data/makedumpfile-1.6.7/tools.c:202: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). if (line == NULL || strlen(line) == 0) data/makedumpfile-1.6.7/tools.c:224: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). if (line == NULL || strlen(line) == 0) data/makedumpfile-1.6.7/tools.c:241: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). if (line == NULL || strlen(line) == 0) data/makedumpfile-1.6.7/tools.c:258: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). if (line == NULL || strlen(line) == 0) data/makedumpfile-1.6.7/tools.c:282: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). if (line == NULL || strlen(line) == 0) data/makedumpfile-1.6.7/tools.c:424:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). origlen = strlen(s); data/makedumpfile-1.6.7/tools.c:439: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). for (i = 0; i < strlen(line); i++) { data/makedumpfile-1.6.7/tools.c:453: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). s[strlen(s)+1] = NULLCHAR; data/makedumpfile-1.6.7/tools.c:454: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). memmove(p1+1, p1, strlen(p1)); data/makedumpfile-1.6.7/tools.c:470:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p1 = &buf[strlen(buf)-1]; data/makedumpfile-1.6.7/tools.c:584: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(s) > MAX_HEXADDR_STRLEN) { data/makedumpfile-1.6.7/tools.c:587: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). s, (int)strlen(s), (int)MAX_HEXADDR_STRLEN); ANALYSIS SUMMARY: Hits = 312 Lines analyzed = 29823 in approximately 0.67 seconds (44286 lines/second) Physical Source Lines of Code (SLOC) = 22287 Hits@level = [0] 41 [1] 142 [2] 143 [3] 3 [4] 24 [5] 0 Hits@level+ = [0+] 353 [1+] 312 [2+] 170 [3+] 27 [4+] 24 [5+] 0 Hits/KSLOC@level+ = [0+] 15.8388 [1+] 13.9992 [2+] 7.62777 [3+] 1.21147 [4+] 1.07686 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.