Commit 584313ff authored by James Forshaw's avatar James Forshaw Committed by Commit Bot

Added call to GetDC to check if Win32k enabled.

This CL adds a call to a Win32k API to check if it is really disabled
by the mitigation.

Change-Id: Ibab06e93db59c326b0df79ea562198e055beb88a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764178Reviewed-by: default avatarWill Harris <wfh@chromium.org>
Commit-Queue: James Forshaw <forshaw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689179}
parent 6e3305c9
......@@ -229,7 +229,11 @@ SBOX_TESTS_COMMAND int CheckPolicy(int argc, wchar_t** argv) {
return SBOX_TEST_NOT_FOUND;
}
if (!policy.DisallowWin32kSystemCalls)
return SBOX_TEST_FAILED;
return SBOX_TEST_FIRST_ERROR;
// Check if we can call a Win32k API. Fail if it succeeds.
if (::GetDC(nullptr))
return SBOX_TEST_SECOND_ERROR;
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment