Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1842088 - Avoid blocking blocked modules when loaded as image res…
…ources on Windows 7. r=gstoll Our blocklist code must allow loading blocked modules using LoadLibraryExW with LOAD_LIBRARY_AS_IMAGE_RESOURCE, so that we can collect information about them when we want to send untrusted module pings. This means that we need a trustworthy way to distinguish between these loads and regular DLL loads. Currently, we do the distinction by looking at the AllocationProtect field for the virtual memory mapped for the view. This solution was introduced with bug 1702717, but unfortunately it doesn't work with Windows 7. This - mixed with other reasons - has resulted in the crash spike in bug 1842368. We should thus move to a more trustworthy solution to distinguish between these two kinds of DLL loads. The new solution is to instead check whether the permission to map executable views was asked when the section that we are mapping was created. Because this solution is past proof, it also has more chances to be future proof. Differential Revision: https://phabricator.services.mozilla.com/D183530
- Loading branch information