Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [Vuln-Dev Challenge] - VulnDev1.c Summary

From: Aaron Adams <aadams(at)securityfocus.com>
Date: Wed May 21 2003 - 02:59:25 EDT

Jason,

this is actually incorrect. The IS_MMAPPED value is defined as 0x2. This means that 0x4, 0x5, and 0x8 all do not have the IS_MMAPPED flag set. (Neither would 0x9).

0x4 would have the NON_MAIN_ARENA flag set 0x5 would have the NON_MAIN_ARENA and PREV_INUSE flags set 0x8 would have no flags set.

  • malloc.c --

/* size field is or'ed with PREV_INUSE when previous adjacent chunk in use */
#define PREV_INUSE 0x1

...

/* size field is or'ed with IS_MMAPPED if the chunk was obtained with mmap() */
#define IS_MMAPPED 0x2

...

Do you need help?X

/* size field is or'ed with NON_MAIN_ARENA if the chunk was obtained

   from a non-main arena. This is only set immediately before handing    the chunk to the user, if necessary. */ #define NON_MAIN_ARENA 0x4

--

Aaron Adams


On Tue, 20 May 2003, Jason_Royes wrote:

> This may be totally incorrect, but here's my armchair analysis.
>
> -- snip:malloc.c --
>
> assert (chunk_is_mmapped(p));
>
> n_mmaps--;
>
> /* unmap */
>
> /* munmap returns non-zero on failure */
>
> --
>
> EOF
> >
> On Tue, 2003-05-20 at 19:19, Aaron Adams wrote:
> >
Received on Wed May 21 03:17:20 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:39 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library