Skip to content

Minidump susceptible to DOS #24

Description

@pd-fkie

When minidump parses a module list it takes the number of modules directly from the input file:

mml.NumberOfModules = int.from_bytes(buff.read(4), byteorder = 'little', signed = False)

And afterwards it loops over the unconstrained number of modules and fills a list with MINIDUMP_MODULE objects:

for _ in range(mml.NumberOfModules):
    mml.Modules.append(MINIDUMP_MODULE.parse(buff))

This makes applications using minidump susceptible to DOS since a malicious minidump file could cause allocations of
4294967295 MINIDUMP_MODULE objects taking up a lot of memory on the host.

Would it be possible to limit the number of module objects to prevent the DOS?

This pattern where minidump takes a number of items directly from the input stream and loops over that
number can be found in a lot of other places too. MINIDUMP_MODULE_LIST is not the only class with this weakness.

An example file that lets minidump consume a lot of memory is the following:
oom-0b4dee5bb1227364f2bfc342047532c1212b05ae

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions