Linux-Heap

DeeLMind小于 1 分钟

Linux-Heap

堆溢出漏洞

Linux堆结构

struct malloc_chunk {

  INTERNAL_SIZE_T      prev_size;  /* Size of previous chunk (if free).  */
  INTERNAL_SIZE_T      size;       /* Size in bytes, including overhead. */

  struct malloc_chunk* fd;         /* double links -- used only if free. */
  struct malloc_chunk* bk;

  /* Only used for large blocks: pointer to next larger size.  */
  struct malloc_chunk* fd_nextsize; /* double links -- used only if free. */
  struct malloc_chunk* bk_nextsize;
};

malloc

malloc()在C语言中,会调用内存分配器ptmalloc,以获得动态分配的内存空间chunk,sbrk(),brk(),mmap(),ptmalloc是Glibc库中默认使用的内存池的实现。

er

上次编辑于:
贡献者: DeeLMind