Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASSERT loader_shared.c:390 !DATASEC_PROTECTED(DATASEC_RARELY_PROT) with privlib loaded after DR init #1293

Closed
derekbruening opened this issue Nov 28, 2014 · 1 comment

Comments

@derekbruening
Copy link
Contributor

From [email protected] on October 23, 2013 08:44:30

After fixing the overflow in issue #1292 , we hit:

Application c:\src\dr\test\hello.exe (75468). Internal Error Internal DynamoRIO Error: C:\src\dr\git\src\core\loader_shared.c:390 !DATASEC_PROTECTED(DATASEC_RARELY_PROT)

0:000> kn

ChildEBP RetAddr

00 1ceedbfc 636add9e ntdll!ZwRaiseHardError+0x12
01 1ceedc4c 6367650d dynamorio!nt_messagebox+0xfe [c:\src\dr\git\src\core\win32\ntdll.c @ 3664]
02 1ceedc74 634d9354 dynamorio!debugbox+0x4d [c:\src\dr\git\src\core\win32\os.c @ 4606]
03 1ceee490 634d9853 dynamorio!notify+0x1e4 [c:\src\dr\git\src\core\utils.c @ 1946]
04 1ceee524 634d4544 dynamorio!report_dynamorio_problem+0x4a3 [c:\src\dr\git\src\core\utils.c @ 2205]
05 1ceee65c 635b0705 dynamorio!internal_error+0x124 [c:\src\dr\git\src\core\utils.c @ 183]
06 1ceee680 635b0a26 dynamorio!privload_insert+0x1f5 [c:\src\dr\git\src\core\loader_shared.c @ 390]
07 1ceee6b8 636df71d dynamorio!privload_load+0x2a6 [c:\src\dr\git\src\core\loader_shared.c @ 527]
08 1ceee6d8 636dd75f dynamorio!privload_locate_and_load+0x21d [c:\src\dr\git\src\core\win32\loader.c @ 1393]
09 1ceee6f8 636dd69e dynamorio!privload_lookup_locate_and_load+0x8f [c:\src\dr\git\src\core\win32\loader.c @ 841]
0a 1ceee71c 636e3811 dynamorio!privload_load_private_library+0x2e [c:\src\dr\git\src\core\win32\loader.c @ 857]
0b 1ceee734 63e210f8 dynamorio!redirect_LoadLibraryA+0x51 [c:\src\dr\git\src\core\win32\drwinapi\kernel32_lib.c @ 139]
0c 1ceee744 63e23fd4 dbghelp!Win32LiveSystemProvider::GetCpuPowerInfo+0x19
0d 1ceee770 63e1d69c dbghelp!NtWin32LiveSystemProvider::GetCpuPowerInfo+0x98
0e 1ceee7b8 63e1e9e1 dbghelp!GenAllocateProcessObject+0x1f0
0f 1ceeec08 63e1a976 dbghelp!GenGetProcessInfo+0x31
10 1ceeed94 63e1adbb dbghelp!MiniDumpProvideDump+0x175
11 1ceeee10 73f3125f dbghelp!MiniDumpWriteDump+0x1ce
12 1ceeeeb4 1ceb109c minidump!snap_cb3+0x8f [c:\src\dr\bugs\minidump\minidump.c @ 102]

We need to handle dlls loaded post-DR-init. It's quite surprising that we
don't handle this already -- surely Dr. Memory would have hit this at some
point?

There are two issues:

  1. We have to make .data writable to change modlist.
  2. We have to make drmarker, sitting in interception_code, writable for
    privload_add_windbg_cmds_post_init().

Original issue: http://code.google.com/p/dynamorio/issues/detail?id=1293

@derekbruening
Copy link
Contributor Author

From [email protected] on October 23, 2013 12:43:49

This issue was closed by revision r2329 .

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant