Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Issue 318603003: Sandbox policy and intercepts for the MITIGATION_WIN32K_DISABLE policy for renderer processes. (Closed)

Created:
6 years, 6 months ago by ananta
Modified:
6 years, 6 months ago
CC:
chromium-reviews, Ian Vollick, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, cc-bugs_chromium.org
Visibility:
Public.

Description

Sandbox policy and intercepts for the MITIGATION_WIN32K_DISABLE policy for renderer processes. This policy when set will prevent the renderer process from making Win32K.sys calls via user32/gdi32 on Windows 8 and beyond. The following intercepts are needed for getting basic renderer functionality. 1. gdi32!GdiDllInitialize: 2. gdi32!GetStockObject. 3. user32!RegisterClassW. The above functions are called during renderer process initialization. We intercept these APIS by EAT patching the corresponding dlls and return fake success values from those. The intercepts live in the process_mitigations_win32k_interception.cc/.h files. The rest of the changes are plumbing with the sandbox policy framework. While basic renderers work well now on Windows 8, pepper flash does not as it sends an IPC to the renderer to creating the transport DIB. Justin is aware of this problem and thinks we can workaround this. BUG=365160 Added gdi and user32 interceptors for the win32k lockdown project. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276407

Patch Set 1 #

Patch Set 2 : Fixed comment #

Total comments: 37

Patch Set 3 : code review comments #

Total comments: 2

Patch Set 4 : Code review comments tests #

Total comments: 22

Patch Set 5 : #

Total comments: 6

Patch Set 6 : Code review comments #

Patch Set 7 : Rebased with conflicts resolved #

Patch Set 8 : Fixed presubmit warnings #

Unified diffs Side-by-side diffs Delta from patch set Stats (+350 lines, -9 lines) Patch
M content/common/sandbox_win.cc View 1 2 3 4 2 chunks +7 lines, -3 lines 0 comments Download
M sandbox/win/sandbox_win.gypi View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M sandbox/win/src/interceptors.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M sandbox/win/src/interceptors_64.h View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
M sandbox/win/src/interceptors_64.cc View 1 2 3 4 5 6 2 chunks +24 lines, -0 lines 0 comments Download
M sandbox/win/src/ipc_tags.h View 1 chunk +3 lines, -0 lines 0 comments Download
M sandbox/win/src/process_mitigations_test.cc View 1 2 3 4 5 6 7 3 chunks +47 lines, -4 lines 0 comments Download
A sandbox/win/src/process_mitigations_win32k_dispatcher.h View 1 2 1 chunk +31 lines, -0 lines 0 comments Download
A sandbox/win/src/process_mitigations_win32k_dispatcher.cc View 1 2 3 1 chunk +57 lines, -0 lines 0 comments Download
A sandbox/win/src/process_mitigations_win32k_interception.h View 1 2 1 chunk +46 lines, -0 lines 0 comments Download
A sandbox/win/src/process_mitigations_win32k_interception.cc View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
A sandbox/win/src/process_mitigations_win32k_policy.h View 1 2 4 1 chunk +35 lines, -0 lines 0 comments Download
A sandbox/win/src/process_mitigations_win32k_policy.cc View 1 2 3 4 1 chunk +24 lines, -0 lines 0 comments Download
M sandbox/win/src/sandbox_policy.h View 1 2 3 4 5 2 chunks +6 lines, -2 lines 0 comments Download
M sandbox/win/src/sandbox_policy_base.cc View 1 2 3 4 5 6 3 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
ananta
6 years, 6 months ago (2014-06-06 01:12:05 UTC) #1
ananta
6 years, 6 months ago (2014-06-06 01:12:37 UTC) #2
jschuh
Big picture comment: you don't need to add a new policy for this. All you're ...
6 years, 6 months ago (2014-06-06 03:23:37 UTC) #3
rvargas (doing something else)
I have vague recollections about discussions to have a more formal policy for stuff conveyed ...
6 years, 6 months ago (2014-06-06 21:22:24 UTC) #4
ananta
https://codereview.chromium.org/318603003/diff/20001/content/common/sandbox_win.cc File content/common/sandbox_win.cc (right): https://codereview.chromium.org/318603003/diff/20001/content/common/sandbox_win.cc#newcode338 content/common/sandbox_win.cc:338: result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_WIN32K_LOCKDOWN, On 2014/06/06 03:23:36, Justin Schuh wrote: ...
6 years, 6 months ago (2014-06-06 23:57:36 UTC) #5
rvargas (doing something else)
How about unit tests? https://codereview.chromium.org/318603003/diff/20001/sandbox/win/src/process_mitigations_win32k_dispatcher.cc File sandbox/win/src/process_mitigations_win32k_dispatcher.cc (right): https://codereview.chromium.org/318603003/diff/20001/sandbox/win/src/process_mitigations_win32k_dispatcher.cc#newcode22 sandbox/win/src/process_mitigations_win32k_dispatcher.cc:22: return true; On 2014/06/06 23:57:35, ...
6 years, 6 months ago (2014-06-09 20:05:57 UTC) #6
ananta
On 2014/06/09 20:05:57, rvargas wrote: > How about unit tests? > > https://codereview.chromium.org/318603003/diff/20001/sandbox/win/src/process_mitigations_win32k_dispatcher.cc > File ...
6 years, 6 months ago (2014-06-10 00:30:51 UTC) #7
ananta
https://codereview.chromium.org/318603003/diff/40001/sandbox/win/src/sandbox_policy.h File sandbox/win/src/sandbox_policy.h (right): https://codereview.chromium.org/318603003/diff/40001/sandbox/win/src/sandbox_policy.h#newcode57 sandbox/win/src/sandbox_policy.h:57: LOCKDOWN_WIN32K // Locks down the Win32K subsystem for the ...
6 years, 6 months ago (2014-06-10 00:32:10 UTC) #8
rvargas (doing something else)
Looks good https://codereview.chromium.org/318603003/diff/60001/content/common/sandbox_win.cc File content/common/sandbox_win.cc (right): https://codereview.chromium.org/318603003/diff/60001/content/common/sandbox_win.cc#newcode614 content/common/sandbox_win.cc:614: L"FakeUserGdiInit") != sandbox::SBOX_ALL_OK) { Does it work ...
6 years, 6 months ago (2014-06-10 03:11:18 UTC) #9
ananta
https://codereview.chromium.org/318603003/diff/60001/content/common/sandbox_win.cc File content/common/sandbox_win.cc (right): https://codereview.chromium.org/318603003/diff/60001/content/common/sandbox_win.cc#newcode614 content/common/sandbox_win.cc:614: L"FakeUserGdiInit") != sandbox::SBOX_ALL_OK) { On 2014/06/10 03:11:17, rvargas wrote: ...
6 years, 6 months ago (2014-06-10 21:48:07 UTC) #10
rvargas (doing something else)
LGTM after final nits. https://codereview.chromium.org/318603003/diff/80001/sandbox/win/src/process_mitigations_test.cc File sandbox/win/src/process_mitigations_test.cc (right): https://codereview.chromium.org/318603003/diff/80001/sandbox/win/src/process_mitigations_test.cc#newcode240 sandbox/win/src/process_mitigations_test.cc:240: SBOX_ALL_OK); nit: indent under first ...
6 years, 6 months ago (2014-06-10 23:03:08 UTC) #11
ananta
https://codereview.chromium.org/318603003/diff/80001/sandbox/win/src/process_mitigations_test.cc File sandbox/win/src/process_mitigations_test.cc (right): https://codereview.chromium.org/318603003/diff/80001/sandbox/win/src/process_mitigations_test.cc#newcode240 sandbox/win/src/process_mitigations_test.cc:240: SBOX_ALL_OK); On 2014/06/10 23:03:08, rvargas wrote: > nit: indent ...
6 years, 6 months ago (2014-06-10 23:15:57 UTC) #12
ananta
The CQ bit was checked by ananta@chromium.org
6 years, 6 months ago (2014-06-11 02:07:17 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ananta@chromium.org/318603003/100001
6 years, 6 months ago (2014-06-11 02:08:19 UTC) #14
ananta
The CQ bit was checked by ananta@chromium.org
6 years, 6 months ago (2014-06-11 02:42:20 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ananta@chromium.org/318603003/120001
6 years, 6 months ago (2014-06-11 02:44:16 UTC) #16
ananta
The CQ bit was unchecked by ananta@chromium.org
6 years, 6 months ago (2014-06-11 03:05:56 UTC) #17
ananta
+jam for content\common owners stamp
6 years, 6 months ago (2014-06-11 03:07:06 UTC) #18
jschuh
On 2014/06/11 03:07:06, ananta wrote: > +jam for content\common owners stamp I can lgtm that.
6 years, 6 months ago (2014-06-11 06:31:17 UTC) #19
jschuh
The CQ bit was checked by jschuh@chromium.org
6 years, 6 months ago (2014-06-11 06:31:26 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ananta@chromium.org/318603003/140001
6 years, 6 months ago (2014-06-11 06:34:36 UTC) #21
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-11 09:09:33 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-11 09:31:35 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_aosp/builds/82569)
6 years, 6 months ago (2014-06-11 09:31:36 UTC) #24
jschuh
The CQ bit was checked by jschuh@chromium.org
6 years, 6 months ago (2014-06-11 14:52:53 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ananta@chromium.org/318603003/140001
6 years, 6 months ago (2014-06-11 14:53:30 UTC) #26
commit-bot: I haz the power
6 years, 6 months ago (2014-06-11 15:28:02 UTC) #27
Message was sent while issue was closed.
Change committed as 276407

Powered by Google App Engine
This is Rietveld 408576698