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

Issue 2579213002: Don't skip security checks for javascript: URLs when the JS stack is empty. (Closed)

Created:
4 years ago by dcheng
Modified:
4 years ago
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2924
Project:
chromium
Visibility:
Public.

Description

Don't skip security checks for javascript: URLs when the JS stack is empty. Before this patch, HTMLFrameElementBase::isURLAllowed would skip the security check if there were no JavaScript frames on the stack. This could lead to UXSS bugs if an attacker managed to trick the parser into attaching a frame element with a cross-origin document and the src attribute set to a javascript: URL. After this patch, the security context of the frame's containing document is used to verify if the URL is allowed. Nothing else (expect for some other same-origin context) could've set the src attribute, so we assume it's the most logical choice in the absence of the current JavaScript context. BUG=117226 Review-Url: https://codereview.chromium.org/2502783004 Cr-Commit-Position: refs/heads/master@{#436449} (cherry picked from commit 783e19486cab2b7485b4a19c02a2eb0369f3b350) R=esprehn@chromium.org, haraken@chromium.org, jochen@chromium.org Committed: https://chromium.googlesource.com/chromium/src/+/6a2bb4e40356e5a96ff3395ee5ba8c1b48736f9d

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -17 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScriptController.h View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp View 2 chunks +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp View 2 chunks +13 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
dcheng
This is a merge to M56. I believe this should be safe, but if anyone ...
4 years ago (2016-12-16 01:33:12 UTC) #2
haraken
LGTM on my side
4 years ago (2016-12-16 01:36:36 UTC) #3
esprehn
lgtm
4 years ago (2016-12-16 01:54:02 UTC) #4
jochen (gone - plz use gerrit)
lgtm
4 years ago (2016-12-16 09:27:41 UTC) #5
dcheng
4 years ago (2016-12-16 09:34:46 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
6a2bb4e40356e5a96ff3395ee5ba8c1b48736f9d.

Powered by Google App Engine
This is Rietveld 408576698