gecko-dev/mozglue/misc
Toshihito Kikuchi c277593b98 Bug 1587539 - Skip bounds check when getting IAT if Import Directory is tampered. r=aklotz
Some applications tamper Import Directory entry of a loaded executable image
to pretend static dependency on their module.  We have `RestoreImportDirectory`
to revert it in the browser process.  If tampering happened in the launcher
process, however, we failed to get an IAT thunk address via `GetIATThunksForModule`
because it could be located outside the mapped image.

With this patch, we skip bounds check in `GetIATThunksForModule` if we detect
tampering in the launcher process.  We can proceed safely because it's expected
that Import Directory is still valid though it's located outside.

Differential Revision: https://phabricator.services.mozilla.com/D49690

--HG--
extra : moz-landing-system : lando
2019-11-06 21:54:55 +00:00
..
decimal Bug 1554063 - Move decimal to mozglue. r=jwalden 2019-05-29 06:57:28 +00:00
interceptor Bug 1580293: Ensure that parameter packs in mozglue/misc are expanded as rvalue references; r=mhowell 2019-09-10 19:55:44 +00:00
AutoProfilerLabel.cpp Bug 1573273: Add ProfilerLabelBegin and ProfilerLabelEnd to mozglue; r=gerald 2019-08-14 03:46:41 +00:00
AutoProfilerLabel.h Bug 1573273: Add ProfilerLabelBegin and ProfilerLabelEnd to mozglue; r=gerald 2019-08-14 03:46:41 +00:00
ConditionVariable_posix.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
ConditionVariable_windows.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
Debug.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
DynamicallyLinkedFunctionPtr.h Bug 1580293: Ensure that parameter packs in mozglue/misc are expanded as rvalue references; r=mhowell 2019-09-10 19:55:44 +00:00
ImportDir.h Bug 1587539 - Skip bounds check when getting IAT if Import Directory is tampered. r=aklotz 2019-11-06 21:54:55 +00:00
MutexPlatformData_posix.h Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
MutexPlatformData_windows.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
Mutex_posix.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
Mutex_windows.cpp Bug 1062533 - part 4 - expose a tryLock method for PlatformMutex; r=mccr8 2019-01-09 11:09:24 -04:00
NativeNt.h Bug 1587539 - Skip bounds check when getting IAT if Import Directory is tampered. r=aklotz 2019-11-06 21:54:55 +00:00
PlatformConditionVariable.h Bug 1536316 remove suggestion that spurious condition variable wakeups are magically handled by ConditionVariableImpl r=froydnj 2019-03-25 12:41:19 +00:00
PlatformMutex.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
Printf.cpp Bug 1539605 - add fast paths for integer formatting on nsTSubstring; r=erahm 2019-03-29 19:38:53 +00:00
Printf.h Bug 1539605 - add fast paths for integer formatting on nsTSubstring; r=erahm 2019-03-29 19:38:53 +00:00
StackWalk.cpp Bug 1572238 - Dump assertion stacks using __android_log_print. r=Ehsan 2019-09-24 20:50:41 +00:00
StackWalk.h Bug 1573090 - Part 2: Look up ELF symbol tables directly when pre-symbolicating Gecko profiles on Linux. r=gerald 2019-08-23 05:45:16 +00:00
StackWalk_windows.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-06 18:29:55 +00:00
TimeStamp.cpp Bug 1523969 part 18 - Move method definition inline comments to new line in mozglue. r=glandium 2019-02-25 16:10:53 -06:00
TimeStamp.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
TimeStamp_darwin.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TimeStamp_posix.cpp Bug 1577236 - clang-10: Fix -Wimplicit-int-float-conversion warnings in various dirs r=glandium 2019-08-30 09:11:19 +00:00
TimeStamp_windows.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TimeStamp_windows.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
WinUtils.h Bug 1542830: Part 4 - Modify mozglue to use new untrusted modules interfaces; r=mhowell 2019-09-23 20:18:41 +00:00
WindowsMapRemoteView.cpp Bug 1571875: Part 2 - Change over all existing static local uses of DynamicallyLinkedFunctionPtr to use StaticDynamicallyLinkedFunctionPtr instead; r=mhowell 2019-08-07 15:58:09 +00:00
WindowsMapRemoteView.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
WindowsProcessMitigations.cpp Bug 1571875: Part 2 - Change over all existing static local uses of DynamicallyLinkedFunctionPtr to use StaticDynamicallyLinkedFunctionPtr instead; r=mhowell 2019-08-07 15:58:09 +00:00
WindowsProcessMitigations.h Bug 1546545: Part 2 - Create empty TrampolineCollection if the process sandbox forbids dynamic code r=aklotz 2019-04-29 21:07:20 +00:00
WindowsUnicode.cpp Bug 1542830: Part 4 - Modify mozglue to use new untrusted modules interfaces; r=mhowell 2019-09-23 20:18:41 +00:00
WindowsUnicode.h Bug 1542830: Part 4 - Modify mozglue to use new untrusted modules interfaces; r=mhowell 2019-09-23 20:18:41 +00:00
moz.build Bug 1572238 - Dump assertion stacks using __android_log_print. r=Ehsan 2019-09-24 20:50:41 +00:00
nsWindowsDllInterceptor.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-06 18:29:55 +00:00