关于“堆相关数据结构”
#731
Replies: 2 comments
-
您好,非常感谢您的评论。近期比较忙,我尽量在过年期间统一处理一下这些评论。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
@ClarkCh 这里的表述确实有些不太恰当,欢迎 PR~ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
PWN-GLIBC HEAP利用-堆相关数据结构中,有原文
"可以看出除了第一个 bin(unsorted bin)外,后面的每个 bin 的表头 chunk 会重用前面的 bin 表头 chunk 的 fd 与 bk 字段,将其视为其自身的 prev_size 和 size 字段。这里也说明了一个问题,bin 的下标和我们所说的第几个 bin 并不是一致的。同时,bin 表头的 chunk 头节点 的 prev_size 与 size 字段不能随便修改,因为这两个字段是其它 bin 表头 chunk 的 fd 和 bk 字段。"
个人认为这根本就不是重用,只是直接虚构了一个假的malloc_chunk结构体,bin_at提供的这个假bin(即假malloc_chunk),只是当成一个malloc_chunk结构体来查找fd和bk而已,如果访问其他字段如prev_size就会访问到错误的信息(如大佬所说的内容)

Beta Was this translation helpful? Give feedback.
All reactions