O'Reilly logo

Memory Dump Analysis Anthology, Volume 7 by Dmitry Vostokov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Shared Buffer Overwrite

This is a Mac OS X example of Shared Buffer Overwrite pattern (Volume 5, page 120). Originally we wanted to construct a default C runtime heap corruption example using malloc / free functions. Unfortunately, we couldn't get heap corrupted as easily as was possible in Windows Visual C++ environment by writing before or after allocated block. Desperately we printed allocated pointers and they all pointed to memory blocks laid out one after another without any headers in between (could be just a default Apple LLVM C runtime implementation and we have to check that with GCC). Therefore, any subsequent reallocation didn't cause corruption either. So all this naturally fits into shared buffer overwrites or underwrites where ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required