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

Issue 23760004: ChildProcessSecurityPolicy: Port FileAPIMessageFilter to use new checks (Closed)

Created:
7 years, 3 months ago by tommycli
Modified:
7 years, 3 months ago
Reviewers:
kinuko, Tom Sepez, jam
CC:
chromium-reviews, joi+watch-content_chromium.org, tzik+watch_chromium.org, kinuko+watch, darin-cc_chromium.org
Visibility:
Public.

Description

ChildProcessSecurityPolicy: Port FileAPIMessageFilter to use new checks This CL: * Closes the P1 security hole described in http://crbug.com/284792 by changing the message contents to contain Pepper file open flags instead of base::PlatformFileFlags and checking those in FileAPIMessageFilter. * Ports the rest of FileAPIMessageFilter to use new CPSP calls. * Ports one call in ResourceDispatcherHostImpl. * Makes base::PlatformFileFlags-based methods private in CPSP. Refactoring document / plans here: https://docs.google.com/a/google.com/document/d/1QGkGWuwgSuaRqovz4wyb0upqPKDVsgYOFKt44E7gmOE/edit?usp=sharing BUG=262142, 284792 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223399

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 16

Patch Set 8 : apply kinuko suggestions on reducing sloc bloat #

Total comments: 6

Patch Set 9 : #

Patch Set 10 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -142 lines) Patch
M content/browser/child_process_security_policy_impl.h View 1 2 3 4 5 6 3 chunks +15 lines, -14 lines 0 comments Download
M content/browser/child_process_security_policy_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/browser/fileapi/browser_file_system_helper.h View 1 2 1 chunk +0 lines, -8 lines 0 comments Download
M content/browser/fileapi/browser_file_system_helper.cc View 1 2 1 chunk +0 lines, -21 lines 0 comments Download
M content/browser/fileapi/fileapi_message_filter.h View 1 2 3 4 5 6 7 8 9 4 chunks +7 lines, -5 lines 0 comments Download
M content/browser/fileapi/fileapi_message_filter.cc View 1 2 3 4 5 6 7 8 9 20 chunks +102 lines, -61 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_security_helper.h View 1 2 3 4 5 6 7 1 chunk +9 lines, -1 line 0 comments Download
M content/browser/renderer_host/pepper/pepper_security_helper.cc View 1 2 3 4 5 6 7 8 2 chunks +41 lines, -11 lines 0 comments Download
M content/child/fileapi/file_system_dispatcher.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -4 lines 0 comments Download
M content/child/fileapi/file_system_dispatcher.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -4 lines 0 comments Download
M content/common/fileapi/file_system_messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/pepper/pepper_file_io_host.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -8 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
tommycli
kinuko: Need review on content/browser. tsepez: Need security review. jam: Need the rest.
7 years, 3 months ago (2013-09-04 21:56:54 UTC) #1
Tom Sepez
LGTM from a security perspective, but some other issues. https://codereview.chromium.org/23760004/diff/34001/content/browser/fileapi/fileapi_message_filter.cc File content/browser/fileapi/fileapi_message_filter.cc (right): https://codereview.chromium.org/23760004/diff/34001/content/browser/fileapi/fileapi_message_filter.cc#newcode299 content/browser/fileapi/fileapi_message_filter.cc:299: ...
7 years, 3 months ago (2013-09-04 22:22:44 UTC) #2
tommycli
tsepez: Agreed with a lot of your issues with SLOC bloat / repetition. I didn't ...
7 years, 3 months ago (2013-09-04 23:21:26 UTC) #3
kinuko
Looks good, but (as was discussed) having duplicated logics concerns me. FileSystemURLIsValid sequence in FAPMF ...
7 years, 3 months ago (2013-09-05 03:49:43 UTC) #4
tommycli
https://codereview.chromium.org/23760004/diff/34001/content/browser/fileapi/fileapi_message_filter.cc File content/browser/fileapi/fileapi_message_filter.cc (right): https://codereview.chromium.org/23760004/diff/34001/content/browser/fileapi/fileapi_message_filter.cc#newcode299 content/browser/fileapi/fileapi_message_filter.cc:299: if (!FileSystemURLIsValid(context_, url)) { On 2013/09/05 03:49:43, kinuko wrote: ...
7 years, 3 months ago (2013-09-06 01:41:42 UTC) #5
kinuko
lgtm with some nits https://codereview.chromium.org/23760004/diff/53001/content/browser/fileapi/fileapi_message_filter.cc File content/browser/fileapi/fileapi_message_filter.cc (right): https://codereview.chromium.org/23760004/diff/53001/content/browser/fileapi/fileapi_message_filter.cc#newcode502 content/browser/fileapi/fileapi_message_filter.cc:502: NOTREACHED(); nit: just NOTREACHED() << ...
7 years, 3 months ago (2013-09-06 02:28:55 UTC) #6
tommycli
jam: ready for OWNER review https://codereview.chromium.org/23760004/diff/53001/content/browser/fileapi/fileapi_message_filter.cc File content/browser/fileapi/fileapi_message_filter.cc (right): https://codereview.chromium.org/23760004/diff/53001/content/browser/fileapi/fileapi_message_filter.cc#newcode502 content/browser/fileapi/fileapi_message_filter.cc:502: NOTREACHED(); On 2013/09/06 02:28:55, ...
7 years, 3 months ago (2013-09-07 00:28:22 UTC) #7
jam
On 2013/09/07 00:28:22, tommycli wrote: > jam: ready for OWNER review content/child and content/renderer lgtm
7 years, 3 months ago (2013-09-09 14:59:16 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/23760004/78001
7 years, 3 months ago (2013-09-09 20:51:20 UTC) #9
commit-bot: I haz the power
Failed to apply patch for content/browser/fileapi/fileapi_message_filter.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 3 months ago (2013-09-09 20:51:26 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/23760004/78001
7 years, 3 months ago (2013-09-10 02:46:48 UTC) #11
commit-bot: I haz the power
Failed to apply patch for content/browser/child_process_security_policy_impl.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 3 months ago (2013-09-10 02:46:55 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/23760004/87001
7 years, 3 months ago (2013-09-16 16:11:35 UTC) #13
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 3 months ago (2013-09-16 16:20:03 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/23760004/87001
7 years, 3 months ago (2013-09-16 19:23:14 UTC) #15
commit-bot: I haz the power
7 years, 3 months ago (2013-09-16 20:30:51 UTC) #16
Message was sent while issue was closed.
Change committed as 223399

Powered by Google App Engine
This is Rietveld 408576698