Shnatsel / libdiffuzz

Custom memory allocator that helps discover reads from uninitialized memory
Apache License 2.0
163 stars 8 forks source link

Drop remaining libdislocator checks #1

Closed Shnatsel closed 6 years ago

Shnatsel commented 6 years ago

There are at least two superfluous checks this project has inherited from libdislocator:

  1. Additional protected page is allocated at the end of each region. This crashes the binary on buffer overflows, but uses more memory than normal.
  2. There is a global counter for the total amount of memory allocated, and at some point the library refuses to allocate any more. This is useful to detect a memory leak.

The primary reason I want to get rid of these is that I want to be sure that when a binary crashes under libdiffuzz and doesn't crash without it, it's because uninitialized memory is leaked into the output.

There are other excellent tools to isolate buffer overflows or memory leaks (asan, libdislocator), which should be used if those are the issues you're looking for.

Shnatsel commented 6 years ago

Fixed by #4