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

Issue 14750007: NaCl: enable meta-based validation for shared libraries. (Closed)

Created:
7 years, 7 months ago by Nick Bray (chromium)
Modified:
7 years, 6 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, raymes+watch_chromium.org, yzshen+watch_chromium.org, piman+watch_chromium.org, native-client-reviews_googlegroups.com, ihf+watch_chromium.org, sehr, bbudge, kmixter1
Visibility:
Public.

Description

NaCl: enable meta-based validation for shared libraries. This is the Chrome-side half of a CL to allow mmaping and skipping validation for chrome-extension: files we have seen before and know are safe. To do this we need to know the path of the file on disk, but we don't entirely trust the renderer not to tamper with it. To work around this, a nonce is passed along with the file handle. This nonce can be used by the NaCl process to acquire the file handle directly from the browser process, as well as a fresh copy of the file handle. This change significantly revises the OpenNaClExecutable method of the PPB_NaCl_Private interface. The method was added anticipation of this CL, but the overall design shifted after the method was added. BUG=https://code.google.com/p/chromium/issues/detail?id=224434 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202278 R=dmichael@chromium.org, jschuh@chromium.org, mseaborn@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202702

Patch Set 1 #

Total comments: 11

Patch Set 2 : EDits #

Patch Set 3 : More edits #

Total comments: 58

Patch Set 4 : Candidate #

Patch Set 5 : Edits #

Patch Set 6 : Missed fixes #

Total comments: 4

Patch Set 7 : Comment #

Total comments: 51

Patch Set 8 : Formatting #

Total comments: 1

Patch Set 9 : Tweaks #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+441 lines, -132 lines) Patch
M chrome/browser/nacl_host/nacl_browser.h View 1 2 3 4 5 6 7 8 4 chunks +39 lines, -0 lines 0 comments Download
M chrome/browser/nacl_host/nacl_browser.cc View 1 2 3 4 5 6 7 5 chunks +81 lines, -0 lines 0 comments Download
M chrome/browser/nacl_host/nacl_file_host.cc View 1 2 3 3 chunks +36 lines, -30 lines 0 comments Download
M chrome/browser/nacl_host/nacl_process_host.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/nacl_host/nacl_process_host.cc View 1 2 3 4 5 6 7 3 chunks +82 lines, -1 line 0 comments Download
M chrome/common/nacl_messages.h View 1 2 3 4 5 6 7 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/common/render_messages.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/nacl/nacl_listener.cc View 1 2 3 4 5 6 7 2 chunks +33 lines, -0 lines 0 comments Download
M chrome/nacl/nacl_validation_db.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/nacl/nacl_validation_query.h View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/nacl/nacl_validation_query.cc View 1 2 3 4 5 6 7 8 4 chunks +28 lines, -0 lines 1 comment Download
M chrome/nacl/nacl_validation_query_unittest.cc View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/renderer/pepper/ppb_nacl_private_impl.cc View 1 2 3 2 chunks +7 lines, -7 lines 0 comments Download
M ppapi/api/private/ppb_nacl_private.idl View 1 2 3 2 chunks +2 lines, -7 lines 0 comments Download
M ppapi/c/private/ppb_nacl_private.h View 1 2 3 4 chunks +5 lines, -19 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/file_downloader.h View 1 2 3 3 chunks +7 lines, -3 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/file_downloader.cc View 1 2 3 6 chunks +22 lines, -6 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/plugin.h View 1 2 3 3 chunks +7 lines, -4 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/plugin.cc View 1 2 3 4 5 6 7 6 chunks +27 lines, -30 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/service_runtime.h View 1 2 3 4 5 6 7 3 chunks +7 lines, -4 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/service_runtime.cc View 1 2 3 4 5 6 7 9 chunks +24 lines, -18 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Nick Bray (chromium)
PPAPI OWNER: dmichael@chromium.org NaCl OWNER: mseaborn@chromium.org IPC security OWNER: jschuh@chromium.org FYI: sehr@chromium.org, bbudge@chromium.org This is ...
7 years, 7 months ago (2013-05-13 20:49:09 UTC) #1
dmichael (off chromium)
ppapi stuff looks pretty straightforward, though I don't feel qualified to comment on the nonce ...
7 years, 7 months ago (2013-05-15 18:37:53 UTC) #2
bennet.yee
https://codereview.chromium.org/14750007/diff/1/chrome/browser/nacl_host/nacl_process_host.cc File chrome/browser/nacl_host/nacl_process_host.cc (right): https://codereview.chromium.org/14750007/diff/1/chrome/browser/nacl_host/nacl_process_host.cc#newcode961 chrome/browser/nacl_host/nacl_process_host.cc:961: if (!NaClBrowser::GetInstance()->GetFilePath(nonce, &file_path)){ this should never happen in normal ...
7 years, 7 months ago (2013-05-16 01:52:48 UTC) #3
Nick Bray (chromium)
PTAL https://codereview.chromium.org/14750007/diff/1/chrome/browser/nacl_host/nacl_process_host.cc File chrome/browser/nacl_host/nacl_process_host.cc (right): https://codereview.chromium.org/14750007/diff/1/chrome/browser/nacl_host/nacl_process_host.cc#newcode961 chrome/browser/nacl_host/nacl_process_host.cc:961: if (!NaClBrowser::GetInstance()->GetFilePath(nonce, &file_path)){ On 2013/05/16 01:52:48, bennet.yee wrote: ...
7 years, 7 months ago (2013-05-16 16:38:17 UTC) #4
dmichael (off chromium)
https://codereview.chromium.org/14750007/diff/1/ppapi/native_client/src/trusted/plugin/file_downloader.cc File ppapi/native_client/src/trusted/plugin/file_downloader.cc (right): https://codereview.chromium.org/14750007/diff/1/ppapi/native_client/src/trusted/plugin/file_downloader.cc#newcode177 ppapi/native_client/src/trusted/plugin/file_downloader.cc:177: return info; On 2013/05/16 16:38:17, Nick Bray (chromium) wrote: ...
7 years, 7 months ago (2013-05-16 17:08:35 UTC) #5
Nick Bray (chromium)
PTAL https://codereview.chromium.org/14750007/diff/1/ppapi/native_client/src/trusted/plugin/file_downloader.cc File ppapi/native_client/src/trusted/plugin/file_downloader.cc (right): https://codereview.chromium.org/14750007/diff/1/ppapi/native_client/src/trusted/plugin/file_downloader.cc#newcode177 ppapi/native_client/src/trusted/plugin/file_downloader.cc:177: return info; On 2013/05/16 17:08:35, dmichael wrote: > ...
7 years, 7 months ago (2013-05-16 17:44:15 UTC) #6
dmichael (off chromium)
ppapi/ lgtm
7 years, 7 months ago (2013-05-16 18:06:38 UTC) #7
Mark Seaborn
> This is the Chrome-side half of a CL to allow mmaping and > skipping ...
7 years, 7 months ago (2013-05-16 23:01:47 UTC) #8
Nick Bray (chromium)
Moved to 128-bit nonce, PTAL. https://codereview.chromium.org/14750007/diff/27001/chrome/browser/nacl_host/nacl_browser.cc File chrome/browser/nacl_host/nacl_browser.cc (right): https://codereview.chromium.org/14750007/diff/27001/chrome/browser/nacl_host/nacl_browser.cc#newcode117 chrome/browser/nacl_host/nacl_browser.cc:117: // allow a sandbox ...
7 years, 7 months ago (2013-05-21 20:09:05 UTC) #9
jschuh
https://codereview.chromium.org/14750007/diff/73001/chrome/browser/nacl_host/nacl_process_host.cc File chrome/browser/nacl_host/nacl_process_host.cc (right): https://codereview.chromium.org/14750007/diff/73001/chrome/browser/nacl_host/nacl_process_host.cc#newcode967 chrome/browser/nacl_host/nacl_process_host.cc:967: &file_path)) { This seems like unambiguously bad occurrence. At ...
7 years, 7 months ago (2013-05-23 01:02:32 UTC) #10
Nick Bray (chromium)
https://codereview.chromium.org/14750007/diff/27001/chrome/browser/nacl_host/nacl_browser.h File chrome/browser/nacl_host/nacl_browser.h (right): https://codereview.chromium.org/14750007/diff/27001/chrome/browser/nacl_host/nacl_browser.h#newcode21 chrome/browser/nacl_host/nacl_browser.h:21: // Open an immutable executable file that can be ...
7 years, 7 months ago (2013-05-23 16:44:11 UTC) #11
jschuh
okay. ipc security lgtm.
7 years, 7 months ago (2013-05-23 16:47:03 UTC) #12
bsy_cr
https://codereview.chromium.org/14750007/diff/73001/chrome/browser/nacl_host/nacl_process_host.cc File chrome/browser/nacl_host/nacl_process_host.cc (right): https://codereview.chromium.org/14750007/diff/73001/chrome/browser/nacl_host/nacl_process_host.cc#newcode967 chrome/browser/nacl_host/nacl_process_host.cc:967: &file_path)) { On 2013/05/23 16:44:11, Nick Bray (chromium) wrote: ...
7 years, 7 months ago (2013-05-23 17:57:24 UTC) #13
Nick Bray (chromium)
ping
7 years, 7 months ago (2013-05-23 23:29:26 UTC) #14
Nick Bray (chromium)
https://codereview.chromium.org/14750007/diff/73001/chrome/browser/nacl_host/nacl_process_host.cc File chrome/browser/nacl_host/nacl_process_host.cc (right): https://codereview.chromium.org/14750007/diff/73001/chrome/browser/nacl_host/nacl_process_host.cc#newcode967 chrome/browser/nacl_host/nacl_process_host.cc:967: &file_path)) { On 2013/05/23 17:57:24, bsy_cr wrote: > On ...
7 years, 7 months ago (2013-05-24 16:54:27 UTC) #15
Mark Seaborn
LGTM with the changes below. I don't know this aspect of ppapi/native_client/src/trusted/plugin so well, so ...
7 years, 7 months ago (2013-05-24 20:21:57 UTC) #16
Nick Bray (chromium)
https://codereview.chromium.org/14750007/diff/79001/chrome/browser/nacl_host/nacl_browser.cc File chrome/browser/nacl_host/nacl_browser.cc (right): https://codereview.chromium.org/14750007/diff/79001/chrome/browser/nacl_host/nacl_browser.cc#newcode42 chrome/browser/nacl_host/nacl_browser.cc:42: // other hand, entries are not always claimed, so ...
7 years, 7 months ago (2013-05-24 21:35:23 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ncbray@chromium.org/14750007/93001
7 years, 7 months ago (2013-05-24 21:40:33 UTC) #18
Mark Seaborn
https://codereview.chromium.org/14750007/diff/93001/chrome/browser/nacl_host/nacl_browser.h File chrome/browser/nacl_host/nacl_browser.h (right): https://codereview.chromium.org/14750007/diff/93001/chrome/browser/nacl_host/nacl_browser.h#newcode102 chrome/browser/nacl_host/nacl_browser.h:102: // TODO(ncbray): move the cache onto NaClProcesHost so that ...
7 years, 7 months ago (2013-05-24 21:55:41 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ncbray@chromium.org/14750007/106001
7 years, 7 months ago (2013-05-24 22:41:39 UTC) #20
Mark Seaborn
https://chromiumcodereview.appspot.com/14750007/diff/106001/chrome/nacl/nacl_validation_query.cc File chrome/nacl/nacl_validation_query.cc (right): https://chromiumcodereview.appspot.com/14750007/diff/106001/chrome/nacl/nacl_validation_query.cc#newcode10 chrome/nacl/nacl_validation_query.cc:10: #include "native_client/src/include/portability.h" Why? You shouldn't be using native_client/src/include/portability.h in ...
7 years, 7 months ago (2013-05-24 22:48:11 UTC) #21
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=4958
7 years, 7 months ago (2013-05-24 22:52:20 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ncbray@chromium.org/14750007/106001
7 years, 7 months ago (2013-05-24 23:38:58 UTC) #23
commit-bot: I haz the power
Change committed as 202278
7 years, 7 months ago (2013-05-25 14:10:10 UTC) #24
Nick Bray (chromium)
7 years, 6 months ago (2013-05-29 00:19:33 UTC) #25
Message was sent while issue was closed.
Committed patchset #9 manually as r202702 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698