DynamoRIO / DynamoRIO/dynamorio
[windows] TLS/TEB/PEB isolation for private dll copies
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
_From [derek.br...@gmail.com](https://code.google.com/u/117968039472581148324/) on January 16, 2010 12:35:09_
xref private Windows loader issue #157 for now we're not providing perfect isolation and are assuming that nothing
terribly intrusive will be done to the TLS (TEB, PEB) shared w/ the app's
dlls. ideally we would could create our own segment and private copies of
the TEB and PEB and have our private dlls use that instead of the system's
per-thread segment. it's not clear we could emulate everything done to
initialize them, and there may be issues with trying to initialize fields
owned by the loader or other components we don't need. would we leave such
fields uninitialized, or would we call LdrInitializeThunk and assume the
only global side effects will be limited to the (private) PEB?
we'd create our own segment via NtSetLdtEntries (xref PR 208009). though
this is only available on 32-bit Windows kernels (xref PR 212905) and
patchguard may prevent even a kernel driver from adding new gdt entries on
64-bit? also xref issue #108 .
_Original issue: http://code.google.com/p/dynamorio/issues/detail?id=249_
Contributor guide
Assessment
This issue has not been assessed yet.