Fastbin dup consolidate
1. fastbin size의 heap1, heap2를 할당
2. heap1를 free
3. largebin size의 heap3 할당 (malloc_consolidate)
4. heap1를 free (DFB)
5. 그 후 malloc 2번은 heap1의 주소로 할당됨
heap1를 free 한후 largebin size의 heap을 할당하면 malloc_consolidate가 호출되면서
free되었던 heap1이 unsorted bin 으로 이동하게 된다.
따라서 fast-top에는 heap1이 없어짐으로 heap1을 한번더 free할 수 있다.
그 후 malloc 2번은 각각 fastbin, unsorted bin 에서 주소를 꺼내오면서 Duplicate가 된다.
'Pwnable > Heap' 카테고리의 다른 글
Implementation of Realloc (0) | 2018.04.06 |
---|---|
Heap exploit (0) | 2018.03.29 |
Fastbindup (0) | 2018.03.11 |
Free Top chunk (0) | 2018.03.03 |
Unsortedbin attack (0) | 2018.02.23 |