PC Review


Reply
Thread Tools Rate Thread

Any way to disable Heap placement randomization (ASLR) for a singleexecutable?

 
 
Paul Pluzhnikov
Guest
Posts: n/a
 
      11th May 2007
Greetings,

This is more of a programming question, and doesn't appear to quite
fit into this newsgroup. Please feel free to direct me to a more
appropriate forum (if one exists).

I have an application (compiler) which dumps its whole parse
tree into a file, and then re-loads it later (for precompiled
header processing), via MapViewOfFileEx().

Because the parse tree contains pointers, it must be re-loaded at
the same address it was when it was saved [1].

This works fine everywhere, but breaks on Vista(R) due to address
space layout randomization (ASLR).

I can try to map the file at the same address it was when it was
saved, but there is a chance that some DLL has already created a
Heap in that space, and then the mapping will fail.

Questions:
1. Is there any address range that is "safe" from ASLR placing a
Heap there? (I could then hard-code that address).
2. Is there any way to tell Vista that "this executable's address
space should not be randomized" ?
3. Any other way for an executable to "reserve" certain fixed
address region?

Thanks,


[1]. Yes, I know I can save the parse tree in an alternative format
(using offsets instead of pointers), and then I would not care what
the mapping address is. But this is significantly slower.

--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
 
Reply With Quote
 
 
 
 
Joe Guidera
Guest
Posts: n/a
 
      12th May 2007
You might post this in one of the developer forums, however does disabling
DEP for that specific executable not work?

J

"Paul Pluzhnikov" <ppluzhnikov-(E-Mail Removed)> wrote in message
news:OU$XMx$(E-Mail Removed)...
> Greetings,
>
> This is more of a programming question, and doesn't appear to quite
> fit into this newsgroup. Please feel free to direct me to a more
> appropriate forum (if one exists).
>
> I have an application (compiler) which dumps its whole parse
> tree into a file, and then re-loads it later (for precompiled
> header processing), via MapViewOfFileEx().
>
> Because the parse tree contains pointers, it must be re-loaded at
> the same address it was when it was saved [1].
>
> This works fine everywhere, but breaks on Vista(R) due to address
> space layout randomization (ASLR).
>
> I can try to map the file at the same address it was when it was
> saved, but there is a chance that some DLL has already created a
> Heap in that space, and then the mapping will fail.
>
> Questions:
> 1. Is there any address range that is "safe" from ASLR placing a
> Heap there? (I could then hard-code that address).
> 2. Is there any way to tell Vista that "this executable's address
> space should not be randomized" ?
> 3. Any other way for an executable to "reserve" certain fixed
> address region?
>
> Thanks,
>
>
> [1]. Yes, I know I can save the parse tree in an alternative format
> (using offsets instead of pointers), and then I would not care what
> the mapping address is. But this is significantly slower.
>
> --
> In order to understand recursion you must first understand recursion.
> Remove /-nsp/ for email.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to disable Heap placement randomization (ASLR) for a singleexecutable? Paul Pluzhnikov Windows Vista Security 4 14th May 2007 05:43 PM
No DEP/NX processor what will happen to ASLR feature? anyone =?Utf-8?B?R1Q=?= Windows Vista General Discussion 1 14th Dec 2006 02:12 AM
ASLR (Address Space Layyou Randomization) churin Windows Vista General Discussion 2 14th Dec 2006 01:29 AM
Heap questions - Low Frag Heap? =?Utf-8?B?UmljaEs=?= Windows XP Embedded 2 3rd Jun 2005 06:13 PM
Re: HEAP: Free Heap block 128eee0 modified at 128ef08 after it wasfreed Scott McPhillips [MVP] Microsoft VC .NET 0 26th Oct 2004 01:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:28 PM.