Resources

People often ask me "How did you learn how to hack?" The answer: by reading. This page is a collection of the blog posts and other articles that I have accumulated over the years of my journey. Enjoy!

"Electric Fence: Who Let the Heap Corruption Out?"- 136

ISE-David PettyPosted 6 Years Ago
  • A great overall description of heap memory corruption!
  • The main memory corruptions:
    1. Freeing pointer that from malloc
    2. Double free (freeing a pointer twice)
    3. Use After Free
    4. Heap Overflow
  • Interesting notes about malloc... If the MALLOC_CHECK_ is turned on then it will detect all double free errors. Additionally, malloc cannot detect trivial use-after-free and out-of-bounds bugs.
  • The reason for the name electric fence is that this is a tool to held find memory corruption bugs. This tool works by replacing malloc, free and related functions with special debugging versions of them.
  • Besides this tool, there is also Valgrind, DynamoRIO and Pin.