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/rekall-1.7.2~rc1+git20190104+dfsg/contrib/pyxpress/pyxpress.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/osx/Rekall/Rekall/RKApplicationDelegate.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/osx/Rekall/Rekall/RKDocument.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/osx/Rekall/Rekall/RKSessionWrapper.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/src/support.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/src/support.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/src/profiles/macho/macho/main.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/src/profiles/mspdb/pdb_info.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/src/profiles/mspdb/sbs_pdb.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/src/profiles/mspdb/test.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/src/profiles/pe/pe.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/module.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/pmem.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_generic.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_relocations.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_relocations.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_sections.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_sections.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_symbols.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_symbols.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/kohook/kohook.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/kohook/kohook.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/elf_dump.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/elf_dump.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/kcore.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/kcore.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lkm_control.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lkm_control.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/memory_map.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/memory_map.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/log/error_log.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/log/log.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/log/log.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/minpmem/debug.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/minpmem/pmem.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/minpmem/pte_mmap.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/minpmem/pte_mmap.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/minpmem/pte_mmap_linux.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/minpmem/pte_mmap_linux.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/minpmem/test.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/test/elfrelink_test.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/test/utest.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/test/test_data/host.strtab.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/test/test_data/parasite.shstrtab.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/vmcs_layout/vmcs_layout.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/vmcs_layout/vmcs_layout.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/alloc.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/logging.cpp
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/logging.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/pmem_common.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/rangemap.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/rangemap.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/MacPmem.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/MacPmem.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/cpu.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/cpu.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/i386_ptable.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/i386_ptable_log.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/i386_ptable_log.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/iokit_pci.cpp
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/iokit_pci.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/meta.cpp
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/meta.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/notifiers.cpp
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/notifiers.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/pte_mmap.cpp
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/pte_mmap.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/safety.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/safety.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/util.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/util.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/MacPmemTest.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/main.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/rangemap_real_test.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/rangemap_tests.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/tests.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/elf.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/linux_pmem.cc
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/linux_pmem.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/osxpmem.cc
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/osxpmem.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/pmem.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/pmem_imager.cc
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/win_pmem.cc
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/win_pmem.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/api.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/api.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/kd.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/kd.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/pci.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/pci.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/pte_mmap.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/pte_mmap.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/pte_mmap_linux.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/pte_mmap_linux.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/pte_mmap_windows.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/pte_mmap_windows.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/read.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/read.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/winpmem.c
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/winpmem.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/elf.h
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/main.cpp
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp
Examining data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.h

FINAL RESULTS:

data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/main.c:98:23:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
                res = chown(file->fts_path, 0, 0);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/main.c:117:23:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
                res = chmod(file->fts_path, 0700);
data/rekall-1.7.2~rc1+git20190104+dfsg/src/profiles/mspdb/pdb_info.h:1060:16:  [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.
/*000.0*/ WORD access      : 2; // CV_access_e
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:554:5:  [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(specific_module_path, args.lib_path);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/log/error_log.h:24:29:  [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(__VA_ARGS__);        \
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/log/log.c:36:7:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      vfprintf(stderr, fmt, argptr);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/log/log.c:42:7:  [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(fmt, argptr);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/log/log.c:48:7:  [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(fmt, argptr);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/log/log.c:53:7:  [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(fmt, argptr);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/log/log.c:59:7:  [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(fmt, argptr);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/logging.cpp:78:29:  [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.
        int required_size = vsnprintf(buffer->buffer, buffer->size, fmt,
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/logging.cpp:89:13:  [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(buffer->buffer, buffer->size, fmt, args);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/logging.cpp:95: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(fmt, args);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/logging.cpp:99:5:  [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(fmt, args);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/meta.cpp:236:19:  [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.
            fmt = snprintf(cursor, room, pmem_efi_range_fmt,
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/meta.cpp:246:19:  [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.
            fmt = snprintf(cursor, room, pmem_pci_range_fmt,
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/meta.cpp:631:15:  [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.
        fmt = snprintf(buffer->buffer, buffer->size, pmem_meta_fmt,
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/osxpmem.cc:255:7:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  if (system(argv.c_str()) != 0) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/osxpmem.cc:284:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (system(argv.c_str()) != 0) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/win_pmem.cc:177:17:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  output_stream.sprintf("CR3: 0x%010llX\n %d memory ranges:\n", info.CR3,
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/win_pmem.cc:181:19:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    output_stream.sprintf("Start 0x%08llX - Length 0x%08llX\n",
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/main.cpp:26:21:  [4] (format) wprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define Log(x, ...) wprintf(x, __VA_ARGS__)
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:564:3:  [4] (format) vwprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vwprintf(message, ap);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:997: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.
#define vsnprintf _vsnprintf
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:1014: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.
    n = vsnprintf (p, size, fmt, ap);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/kohook/kohook.c:83:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((opt = getopt(argc, argv, opt_string)) != -1) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:405:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((opt = getopt(argc, argv, opt_string)) != -1) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/win_pmem.cc:56:14:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
  bSuccess = CreateProcess(
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/win_pmem.cc:56:14:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
  bSuccess = CreateProcess(
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:340:14:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
  bSuccess = CreateProcess(NULL,
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:340:14:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
  bSuccess = CreateProcess(NULL,
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:380:3:  [3] (tmpfile) GetTempFileName:
  Temporary file race condition in certain cases (e.g., if run as SYSTEM in
  many versions of Windows) (CWE-377).
  GetTempFileName(path, L"fls", 0, filename);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:953:5:  [3] (tmpfile) GetTempFileName:
  Temporary file race condition in certain cases (e.g., if run as SYSTEM in
  many versions of Windows) (CWE-377).
    GetTempFileName(path, service_name, 0, filename);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:981:5:  [3] (tmpfile) GetTempFileName:
  Temporary file race condition in certain cases (e.g., if run as SYSTEM in
  many versions of Windows) (CWE-377).
    GetTempFileName(path, service_name, 0, filename);
data/rekall-1.7.2~rc1+git20190104+dfsg/src/profiles/mspdb/test.c:27: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 Data4[8];
data/rekall-1.7.2~rc1+git20190104+dfsg/src/profiles/mspdb/test.c:37: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[8];
data/rekall-1.7.2~rc1+git20190104+dfsg/src/profiles/pe/pe.c:9:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char data[1000];
data/rekall-1.7.2~rc1+git20190104+dfsg/src/support.c:23:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(out, data, MIN(length, buffer_length));
data/rekall-1.7.2~rc1+git20190104+dfsg/src/support.c:72:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char result[sizeof(uint64_t)];
data/rekall-1.7.2~rc1+git20190104+dfsg/src/support.c:163:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char pte_table[0x1000];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:202:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_sym, (uint8_t *) sym, sizeof(Elf_Sym));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:254:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_entry, entry, entry_len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:307:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_shdr, shdr, sizeof(Elf_Shdr));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:546:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(obj->data, data, len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:583:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (!(fp = fopen(path, "r"))) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:616:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (!(fp = fopen(path, "w+"))) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_symbols.c:209: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 sym_name[128];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:485: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 actual_name[BUFSIZ];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:542:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_section, section, len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:559: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 full_section_name[BUFSIZ];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/kcore.c:117: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).
  kcore_fd = open(kcore_path, O_RDONLY);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/kcore.c:131: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).
  dump_fd = open(dump_path, O_CREAT | O_EXCL | O_WRONLY, S_IRUSR);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lkm_control.c:70: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 pmem_line[BUFSIZ];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lkm_control.c:73: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(devices_path, "r")) == NULL) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lkm_control.c:106: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 dev_path[256];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lkm_control.c:108:3:  [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(dev_path, "/dev/");
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lkm_control.c:136: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 dev_path[256];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lkm_control.c:166:3:  [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(dev_path, "/dev/");
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:354: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(args.host_path, fpath, args.host_path_len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:622: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 mod_symbol_name[SYMBUFSIZ];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:696: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).
  mem_dev = open(in_path, O_RDONLY);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:703:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
       open(out_path, O_RDWR | O_CREAT | O_TRUNC, 0440)) == -1) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/memory_map.c:92: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[BUFSIZ];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/memory_map.c:93: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 run_type[64];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/memory_map.c:98: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(iomem_path, "r")) == NULL) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/minpmem/pmem.c:70: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.
static unsigned char zero_page[PAGE_SIZE];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/minpmem/pte_mmap_linux.c:31: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.
static unsigned char rogue_buf[2 * PAGE_SIZE];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/minpmem/test.c:50: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.
static unsigned char pmem_buf[(BUF_PAGES + 1) * PAGE_SIZE];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/test/elfrelink_test.c:89: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).
  assert((fp = fopen(test_host_path, "r")) != NULL);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/test/elfrelink_test.c:349:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_strtab_buf, buf, host_strtab_len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/test/elfrelink_test.c:350:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_strtab_buf + host_strtab_len, new_entry, new_entry_len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/pmem.c:54: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 pmem_devname[32] = "pmem";
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/vmcs_layout/vmcs_layout.c:63:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
unsigned char *regions[MAX_REGIONS];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/vmcs_layout/vmcs_layout.c:248:13:  [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(regions[region_idx], &vmx_rev_id, 4);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/vmcs_layout/vmcs_layout.c:296: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(vmcs_guest_region, &vmx_rev_id, 4);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/vmcs_layout/vmcs_layout.c:677: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(vmxon_region, &vmx_rev_id, 4);  // copy revision id to vmxon region
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/vmcs_layout/vmcs_layout.c:696: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(vmcs_guest_region, &vmx_rev_id, 4); //copy revision id to vmcs region
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/alloc.h:98: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(newmem, ptr, size);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/pmem_common.h:170:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char purpose[PMEM_NAMESIZE];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/pmem_common.h:210:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char kernel_version[PMEM_OSVERSIZE];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/pmem_common.h:235:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char cpuid_vendor_string[12]; // Not null-termed!
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/Common/rangemap.c:77:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    if (!memcpy(new_ranges, rangemap->ranges,
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/meta.cpp:157: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(newmeta, meta, meta->size);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/meta.cpp:216: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(meta->records + meta->records_end, record, record->size);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/util.c:102: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(newbuf, buffer->buffer, buffer->size);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:83: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).
    int fd = open(pmem_infodev, O_RDONLY);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:101:10:  [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(pmem_dev, O_RDONLY);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:186: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).
    int fd = open(pmem_dev, O_RDONLY);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:192:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_string[PMEM_OSVERSIZE];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:220: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).
    int fd = open(pmem_dev, O_RDONLY);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:221:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[read_cmp_frame_len];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:257: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).
    int fd = open(pmem_dev, O_RDONLY);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:261:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[len], buffer_[len];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:304: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).
    int fd = open(pmem_infodev, O_RDONLY);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:305:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[0x1000];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:362:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[0x1000];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:399: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).
        fd_pmem = open(pmem_dev, O_RDONLY);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:404: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).
        fd_info = open(pmem_infodev, O_RDONLY);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:438: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).
    int fd = open(pmem_infodev, O_RDONLY);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:439:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[0x1000];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:469:10:  [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(pmem_dev, O_RDONLY);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/main.c:227:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char cwd[1024];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/tests.h:28: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.
    const char name[40];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/elf.h:420: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	ident[EI_NIDENT];	/* File identification. */
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/elf.h:854: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	ident[EI_NIDENT];	/* File identification. */
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/osxpmem.cc:266:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[1024 * 4];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/pmem/win_pmem.cc:710:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[MAX_PATH];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/api.c:10: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 key[sizeof(OBFUSCATION_KEY)] = OBFUSCATION_KEY;
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/api.c:25:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char parameter[sizeof(X_MmGetPhysicalMemoryRanges)] =
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/api.c:40:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char parameter[sizeof(X_MmGetVirtualForPhysical)] =
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/api.c:54:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char parameter[sizeof(X_MmMapIoSpace)] = X_MmMapIoSpace;
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/api.c:66:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char parameter[sizeof(X_MmUnmapIoSpace)] = X_MmUnmapIoSpace;
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/elf.h:403: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	ident[EI_NIDENT];	/* File identification. */
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/elf.h:837: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	ident[EI_NIDENT];	/* File identification. */
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:371:3:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  TCHAR path[MAX_PATH + 1];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:372:3:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  TCHAR filename[MAX_PATH + 1];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:782: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 time_buffer[32];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:944:5:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    TCHAR path[MAX_PATH + 1];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:945:5:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    TCHAR filename[MAX_PATH + 1];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:972:5:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    TCHAR path[MAX_PATH + 1];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:973:5:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    TCHAR filename[MAX_PATH + 1];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.h:57:3:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  TCHAR last_error[1024];
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/kd.c:149: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.
    if(!strcmp((char *)sections[i].Name, name))
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/pte_mmap_windows.c:24: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 rogue_page[PAGE_SIZE * 3] = "";
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:32:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t string_len = strlen(string);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:33:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t suffix_len = strlen(suffix);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:225: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_t entry_len = strlen(entry) + 1;
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:330: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).
  size_t dep_prefix_len = strlen(dep_prefix);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:348: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).
  dependencies_len = strlen(dependencies);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:362: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(new_name) >= MODULE_NAME_LEN) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:380: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(old_name));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_object.c:389:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(module_name, new_name, MODULE_NAME_LEN);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_sections.c:68:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (strlen(name) == 0) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_symbols.c:213:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(sym_name, name, strlen(name) + 1);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_symbols.c:213:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strncpy(sym_name, name, strlen(name) + 1);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_symbols.c:214:5:  [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(sym_name, suffixes[i], strlen(suffixes[i]));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elf_symbols.c:214: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).
    strncat(sym_name, suffixes[i], strlen(suffixes[i]));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:342: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).
      size_t prefix_len = strlen(prefix);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:343: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).
      size_t prefixed_name_len = strlen(rela_sec_name) + prefix_len + 1;
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:349:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(prefixed_name, prefix, strlen(prefix));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:349:38:  [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(prefixed_name, prefix, strlen(prefix));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:350:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(prefixed_name + strlen(prefix), rela_sec_name,
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:350: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).
      strncpy(prefixed_name + strlen(prefix), rela_sec_name,
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:351: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).
              strlen(rela_sec_name));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:412: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_t name_len = strlen(name);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:413:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t prefix_len = strlen(prefix);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:419:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(new_name, prefix, prefix_len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:420:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(new_name + prefix_len, name, name_len + 1);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:432:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(new_name, name, name_len + 1);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:488: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(name) > 0) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:662:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((strlen(source_name) + strlen(parasite_name) + 1) > BUFSIZ) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:662: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 ((strlen(source_name) + strlen(parasite_name) + 1) > BUFSIZ) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:667:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(full_section_name, parasite_name, BUFSIZ);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:668:5:  [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(full_section_name, source_name, BUFSIZ - strlen(full_section_name));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/elfrelink/elfrelink.c:668:54:  [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(full_section_name, source_name, BUFSIZ - strlen(full_section_name));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/elf_dump.c:118:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(mem_dev, page_buf, PAGE_SIZE) != PAGE_SIZE) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/kcore.c:55:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  bytes_read = read(kcore_fd, &ehdr, sizeof(ehdr));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/kcore.c:72:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bytes_read = read(kcore_fd, &phdr, sizeof(phdr));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lkm_control.c:57: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).
  size_t len = strlen(string);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lkm_control.c:109:3:  [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(dev_path, name, sizeof(dev_path) - strlen(dev_path));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lkm_control.c:109: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).
  strncat(dev_path, name, sizeof(dev_path) - strlen(dev_path));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lkm_control.c:167:3:  [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(dev_path, name, sizeof(dev_path) - strlen(dev_path));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lkm_control.c:167: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).
  strncat(dev_path, name, sizeof(dev_path) - strlen(dev_path));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:272: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).
    extension = name + strlen(name);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:276:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(module_name, name, name_len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:349: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).
  args.host_path_len = strlen(fpath);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:461: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).
        args.host_path_len = strlen(optarg);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:535: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).
    specific_module_path_len = strlen(module_path) + strlen(utsbuf.release) + 1;
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:535:54:  [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).
    specific_module_path_len = strlen(module_path) + strlen(utsbuf.release) + 1;
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:545:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(specific_module_path, module_path, specific_module_path_len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:546:5:  [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(specific_module_path, utsbuf.release, specific_module_path_len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:549:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    specific_module_path = (char *)malloc(strlen(args.lib_path) + 1);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:591: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).
  size_t module_path_len = strlen(specific_module_path);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:592: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).
  size_t lp_path_len = strlen(lp_path);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:604:3:  [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(specific_module_path, lp_path, lp_path_len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:623: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).
  size_t mod_len = strlen(mod_name);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:631: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).
    rela_sym_len = strlen(rela_sym);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:639:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(mod_symbol_name, mod_name, mod_len + 1);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/lmap.c:640:5:  [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(mod_symbol_name, rela_sym, rela_sym_len + 1);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/lmap/memory_map.c:111:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strncmp(run_type, iomem_ram_str, strlen(iomem_ram_str)) == 0) {
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/test/elfrelink_test.c:316: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).
  const size_t new_entry_len = strlen(new_entry) + 1;
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/test/elfrelink_test.c:469: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).
  assert(shdr_dst->sh_offset == old_file_end + strlen(name) + strlen(".pmem")
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/lmap/test/elfrelink_test.c:469: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).
  assert(shdr_dst->sh_offset == old_file_end + strlen(name) + strlen(".pmem")
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/linux/module.c:490:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        cycle_t                 (*read)(struct clocksource *cs);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/cpu.c:82:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(target_buffer, (char *)(reg + EBX), 4);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/cpu.c:83:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(target_buffer + 8, (char *)(reg + ECX), 4);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/cpu.c:84:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(target_buffer + 4, (char *)(reg + EDX), 4);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/iokit_pci.cpp:47:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                      strlen("IOPCIDevice"));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/meta.cpp:445:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(meta->kernel_version, version, PMEM_OSVERSIZE);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/meta.cpp:514: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).
    size_t limit = strlen(buffer->buffer);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/meta.cpp:688: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).
    pmem_resize(buffer, (uint32_t)strlen(pmem_meta_fmt));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/meta.cpp:697: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).
    buffer->cursor = strlen(buffer->buffer);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/util.c:62:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((*copy)->buffer, orig->buffer, orig->size);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmem/util.c:74:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((*buffer)->buffer, string, len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:88:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(fd, buffer, read_cmp_frame_len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:108:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(fd, buffer, read_cmp_frame_len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:194:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t rcv = read(fd, version_string, PMEM_OSVERSIZE);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:236:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bytes_read = read(fd, buffer, read_cmp_frame_len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:270:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    rcv = read(fd, buffer, len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:280:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    rcv = read(fd, buffer_, len);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:315:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    rcv = read(fd, buffer, 0x1000);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:321: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).
    cres = strncmp(buffer, yml_header, strlen(yml_header));
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:325: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).
                   pmem_infodev, yml_header, (int)strlen(yml_header), buffer);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:410:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read(fd_pmem, buffer, 0x1000);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:412:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read(fd_info, buffer, 0x1000);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:448:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bytes_read = read(fd, buffer, 500);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:458:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bytes_read = read(fd, buffer, 0x1000);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/osx/MacPmem/MacPmemTest/kext_tests.c:476:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bytes_read = read(fd, buffer, 500);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:454: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).
      DWORD metadata_len = strlen(metadata);
data/rekall-1.7.2~rc1+git20190104+dfsg/tools/windows/winpmem/executable/winpmem.cpp:845: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).
    metadata_len_ = strlen(metadata_);

ANALYSIS SUMMARY:

Hits = 210
Lines analyzed = 30654 in approximately 0.91 seconds (33838 lines/second)
Physical Source Lines of Code (SLOC) = 21028
Hits@level = [0]  32 [1]  86 [2]  90 [3]   9 [4]  23 [5]   2
Hits@level+ = [0+] 242 [1+] 210 [2+] 124 [3+]  34 [4+]  25 [5+]   2
Hits/KSLOC@level+ = [0+] 11.5085 [1+] 9.98668 [2+] 5.8969 [3+] 1.61689 [4+] 1.18889 [5+] 0.0951113
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.