Trust No Program
This topic is locked: you cannot edit posts or make replies.
minor: some norelocs DLLs cannot be loaded
v2y


Joined: 09 Mar 2008
Posts: 41
Reply with quote
DLL shown below cannot be loaded in sandbox.

dll.c:
Code:
// nothing to do, but typical crt based DLL
#include<windows.h>
BOOL WINAPI DllMain (HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved){
   return TRUE;
}


exe.c:
Code:
#include<windows.h>
#include<stdio.h>

int main( int argc, char *argv[], char *envp[] ){
   HINSTANCE h=LoadLibrary("dll.dll");
   if(h){
      printf("loaded: %x\n",h);
   }
}


mk.cmd:
Code:
cl /MD /LD dll.c /link /fixed /base:0x800000
cl /MD exe.c
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15004
Reply with quote
I see these messages in windbg:

Code:
LDR: LdrRelocateImageWithBias() failed 0xc0000018
LDR: OldBase     : 00800000
LDR: NewBase     : 003F0000
LDR: Diff        : 0x7c90d6dc0012f768
LDR: NextOffset  : 00000000
LDR: *NextOffset : 0x0
LDR: SizeOfBlock : 0x3f0000


I am not sure why, but it looks like under Sandboxie, the 0x800000 address is not available, although it also doesn't look like it's allocated.

But why would you specify /FIXED ?

_________________
tzuk
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15004
Reply with quote
Update. I had a chance to look into this again while I was looking into a related issue. It appears the address 0x800000 becomes unavailable when Sandboxie loads the GDI32 DLL into the process. This is just a minor informational update.
View user's profileSend private message
minor: some norelocs DLLs cannot be loaded
You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

Use the RSS feed to watch this topic for replies
  
  
 This topic is locked: you cannot edit posts or make replies.  

Sandboxie is Copyright © 2004-2012 by Sandboxie Holdings LLC.  All rights reserved.
Sandboxie.com | Contact Author
This site has been viewed 208,481,953 times since June 2004