• Bruce Dawson's avatar
    Use PAGE_TARGETS_INVALID when allocating code pages · 6930df0f
    Bruce Dawson authored
    PAGE_TARGETS_INVALID tells CFG (Control Flow Guard) to mark all
    addresses as invalid indirect branch targets. This makes exploits more
    difficult. The benefit is minor because most of the code in the Chrome
    process doesn't use the CFG checks, but this will close off a few
    weaknesses and is the direction we will want to go in eventually
    anyway (with specific targets or call sites opted-in to allowing
    calls, using SetProcessValidCallTargets).
    
    PAGE_TARGETS_INVALID may ultimately cause CFG to not allocate memory -
    that is implied by Windows Internals 7th Edition - and if that is
    implemented then this change will save some modest amount of memory.
    
    PAGE_TARGETS_INVALID was introduced in Windows 10 - according to
    Windows Internals Part 1 7th Edition - prior to that it will cause
    VirtualAlloc to fail.
    
    Bug: chromium:870054
    Change-Id: Ib1784fba37cc0ecb5fe5df595f1519531b3b3a20
    Reviewed-on: https://chromium-review.googlesource.com/1186025
    Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#55365}
    6930df0f
Name
Last commit
Last update
..
OWNERS Loading commit data...
condition-variable.cc Loading commit data...
condition-variable.h Loading commit data...
elapsed-timer.h Loading commit data...
mutex.cc Loading commit data...
mutex.h Loading commit data...
platform-aix.cc Loading commit data...
platform-cygwin.cc Loading commit data...
platform-freebsd.cc Loading commit data...
platform-fuchsia.cc Loading commit data...
platform-linux.cc Loading commit data...
platform-macos.cc Loading commit data...
platform-openbsd.cc Loading commit data...
platform-posix-time.cc Loading commit data...
platform-posix-time.h Loading commit data...
platform-posix.cc Loading commit data...
platform-posix.h Loading commit data...
platform-qnx.cc Loading commit data...
platform-solaris.cc Loading commit data...
platform-win32.cc Loading commit data...
platform.h Loading commit data...
semaphore.cc Loading commit data...
semaphore.h Loading commit data...
time.cc Loading commit data...
time.h Loading commit data...