Dobin 0x55_DefeatExploitMitigations_heap_intro.pdf
Dobin 0x55_DefeatExploitMitigations_heap_intro.pdf
Dobin 0x55_DefeatExploitMitigations_heap_intro.pdf
12
0.0 (0)
R. Z.
R. Z.
This flashcard set delves into the intricacies of heap memory management at a university level, focusing on concepts like heap overflows, chunk management, and allocator behavior. It covers the characteristics of heap overflows, the workings of malloc and free functions, and the structure of heap chunks, both allocated and free. The flashcards also explore how heap allocators manage memory pages and chunks, and the implications of inter-chunk overflows. This set is invaluable for computer science students and professionals aiming to understand and mitigate heap-based vulnerabilities and optimize memory management in their programs.
Karten
12
Lernende
0
Sprache
Englisch
Kategorie
Religion/Ethik
Stufe
Universität
Erstellt / Aktualisiert
25.06.2019 / 25.06.2019
-
- 1 / 12
-
Lernkarten
What is the heap?
- malloc() allocations
- Fullfill allocating and deallocating of memory regions
- Dynamic memory (allocations at runtime)
- What is on the heap:
- Objects, big buffers, structs, persistence, large things
- Its slow, manually
What do the functions malloc() and free() do?
- malloc(): get a memory region
- free(): release a memory region
How does the heap work?
void *ptr;
ptr = malloc(len)
- Allocated "len" size memory block
- Returns a pointer to this memory block
free(ptr)
- Tells the memory allocator that the memory block can now be re-used
- Note: ptr is NOT NULL after free()
What does the heap allocator do?
the heap allocator does:
- allocate big memory pages from the OS
- Mange these pages
- Split the pages into smaller chunks
- Make these chunks available to the program
What are the characteristics of free heap chunks?
Free heap chunks:
- Free chunks contain heap-metadata in the usable space
- Free chunks organized in a linked list
- Adjacent free chunks are merged in some allocators
- This process is considerably useful for purposes
What is an inter chunk heap overflow and what are the problems with it?
What are the characteristics of a heap overflow?
- A buffer overflow on the heap can modify other buffers on the heap
- A buffer overflow on the heap can invluence memory allocator management data structures (junks etc...)
- and make it write some data to some memory address, in some cases.