Skip to content

Releases: maxmind/libmaxminddb

1.13.2

25 Feb 17:21
Immutable release. Only release title and notes can be modified.
f2d236a

Choose a tag to compare

  • Fixed a compilation failure on macOS 26 (Tahoe) where sys/endian.h defines
    bswap32 and bswap64 as macros, conflicting with our function declarations.
    Reported by Anton Melnikov. GitHub #419.

1.13.1

24 Feb 22:54
Immutable release. Only release title and notes can be modified.
de43d4f

Choose a tag to compare

  • Re-release for Ubuntu PPA. No code changes.

1.13.0

24 Feb 22:37
Immutable release. Only release title and notes can be modified.
d3c23e4

Choose a tag to compare

  • MMDB_get_entry_data_list() now validates that the claimed array/map size is
    plausible given the remaining bytes in the data section. A crafted database
    could previously claim millions of array elements while only having a few
    bytes of data, causing disproportionate memory allocation (memory
    amplification DoS).
  • On Windows, GetFileSize() was replaced with GetFileSizeEx() to correctly
    handle files larger than 4GB. The previous code passed NULL for the high
    DWORD, discarding the upper 32 bits of the file size.
  • Fixed integer overflow in MMDB_read_node() and find_ipv4_start_node()
    pointer arithmetic. The node_number * record_length multiplication was
    performed in uint32_t, which could overflow for very large databases. Now
    cast to uint64_t before multiplying, matching the pattern already used in
    find_address_in_search_tree().
  • Fixed printf format specifier mismatches in mmdblookup's metadata dump. %i
    was used for unsigned types and %llu for uint64_t, which is technically
    undefined behavior. Now uses the portable PRIu32, PRIu16, and PRIu64
    macros from <inttypes.h>.
  • Fixed an integer overflow in the search tree bounds check in
    find_address_in_search_tree(). The addition of node_count and
    data_section_size was performed in uint32_t arithmetic, which could wrap
    on very large databases, causing valid lookups to be incorrectly rejected as
    corrupt.
  • Fixed a NULL pointer dereference in mmdblookup when displaying metadata for
    a database with an out-of-range build_epoch. The gmtime() return value is
    now checked before passing to strftime().
  • MMDB_close() now NULLs the file_content, data_section, and
    metadata_section pointers and zeroes file_size, data_section_size, and
    metadata_section_size after unmapping. Previously, calling MMDB_close()
    twice on the same struct (or calling it after a failed MMDB_open() that
    succeeded at mapping) would double-munmap the file content, which is undefined
    behavior.
  • Fixed a stack buffer overflow in print_indentation() when
    MMDB_dump_entry_data_list() was called with a negative indent value. The
    negative integer was cast to size_t, producing a massive value passed to
    memset(). Negative indent values are now clamped to 0.
  • MMDB_lookup_string() now sets *mmdb_error to MMDB_SUCCESS when
    getaddrinfo fails (non-zero *gai_error). Previously, *mmdb_error was
    left uninitialized in this case, which could cause callers to read an
    indeterminate value.
  • Fixed an off-by-one in mmdblookup on Windows where alloca allocated one
    byte too few for the program name buffer, causing _splitpath to write one
    byte past the end when appending the null terminator.
  • Added a recursion depth limit to skip_map_or_array(), matching the existing
    MAXIMUM_DATA_STRUCTURE_DEPTH (512) limit already used by
    get_entry_data_list(). A crafted MMDB file with deeply nested maps or arrays
    could previously cause a stack overflow via unbounded recursion in the
    MMDB_aget_value / MMDB_get_value code path.
  • Fixed an off-by-one error in MMDB_read_node() that allowed reading one node
    past the end of the search tree when called with node_number == node_count.
    This caused the function to read from the data section separator and return an
    invalid record with an underflowed data offset. The check now correctly
    rejects node_number >= node_count.
  • The handling of float and double types was rewritten to fix compiler errors
    and to eliminate the use of volatile.
  • Improved endian preprocessor check if MMDB_LITTLE_ENDIAN is not set.

1.12.2

10 Jan 17:54
cba618d

Choose a tag to compare

  • MMDB_get_entry_data_list() now always sets the passed entry_data_list
    parameter to either NULL or valid memory. This makes it safe for
    callers to use MMDB_free_entry_data_list() on it even in case of error.
    In 1.12.0 MMDB_get_entry_data_list() was changed to not set this
    parameter to valid memory in additional error cases. That change caused
    segfaults for certain libraries that assumed it was safe to free memory
    on error. Doing so was never safe, but worked in some cases. This change
    makes such calls safe. Reported by Petr Pisar. GitHub
    maxmind/MaxMind-DB-Reader-XS#39.

1.12.1

08 Jan 15:18
0ff5a5b

Choose a tag to compare

  • Added missing cmake_uninstall.cmake.in to the source distribution. This
    was missing from 1.12.0, causing CMake builds to fail. Reported by Marcel
    Raad. GitHub #367.

1.12.0

07 Jan 23:20
a2894be

Choose a tag to compare

  • Fixed memory leaks in MMDB_open(). These could happen with invalid
    databases or in error situations such as failing to allocate memory. As
    part of the fix, MMDB_get_entry_data_list() now frees memory it
    allocates on additional errors. Previously it failed to clean up when
    certain errors occurred. Pull request by pkillarjun. GitHub #356.
  • There is now a build target to fuzz the library. Pull request by
    pkillarjun. GitHub #357.
  • Updated cmake_minimum_required to a version range to quiet deprecation
    warnings on new CMake versions. Reported by gmou3. GitHub #359.
  • The script for generating man pages no longer uses autodie. This
    eliminates the dependency on IPC::System::Simple. Reported by gmou3.
    GitHub #359.
  • An uninstall target is now included for CMake. Pull request by gmou3.
    GitHub #362.

1.11.0

21 Aug 18:00
24df335

Choose a tag to compare

  • When building with CMake, the man pages will now be generated and
    installed. Requested by Thomas Klausner. GitHub #351.
  • Removed unnecessary $<INSTALL_INTERFACE:generated> directory from
    target_include_directories in the CMake build configuration. This is
    a private build directory. Pull request by Ankur Verma. GitHub #354.

1.10.0

10 Jun 17:18
7acfe43

Choose a tag to compare

  • When building with CMake, it is now possible to disable the building
    of binaries (e.g., mmdblookup) with the MAXMINDDB_BUILD_BINARIES
    option and the install target generation with the MAXMINDDB_INSTALL
    option. Pull request by Seena Fallah. GitHub #342.
  • CMake now makes greater use of GNUInstallDirs. Pull request by Maximilian
    Downey Twiss. GitHub #346.
  • The reader can now look up records on a database with a search tree
    that is greater than 4 gigabytes without sometimes returning erroneous
    results due to an integer overflow.

1.9.1

10 Jan 00:18
e26013e

Choose a tag to compare

  • SSIZE_MAX is now defined conditionally on Windows. The 1.9.0
    release would cause a redefinition warning when compiled with MinGW.
    Reported by Andreas Vögele. GitHub #338.

1.9.0

09 Jan 19:42
c796899

Choose a tag to compare

  • On very large databases, the calculation to determine the search tree
    size could overflow. This was fixed and several additional guards
    against overflows were added. Reported by Sami Salonen. GitHub #335.
  • Removed sa_family_t typedef from the public header on Windows. Pull
    request by Noah Treuhaft. GitHub #334.
  • The CMake build was adjusted to allow running builds in parallel.
    Pull request by Vladyslav Miachkov. GitHub #332.