Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(357)

Issue 7182049: Prevent host exceptions leaking through Domado in SES mode. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by kpreid2
Modified:
11 years, 1 month ago
Reviewers:
felix8a, ihab.awad
CC:
caja-discuss-undisclosed_googlegroups.com, MarkM, ihab.awad, Jasvir, metaweta, MikeSamuel, felix8a
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

In SES mode, if host code throws an exception and that exception is caught by guest code, then the guest code can traverse its prototype chain to host globals and wreak havoc. The taming membrane defends against this by catching and rethrowing tamed exceptions; Domado, unfortunately, did not do the same. To close this hole, we repurpose confidence.protectMethod to perform the same rethrowing, and additionally have it take over the job of confidence.p: each protected method gets an additional argument which is the private-fields record. Thus, the host objects stored in said record are only obtained in scopes which also protect against exception leakage. confidence.protectMethod is renamed to 'amplifying', and confidence.p is removed. (Unfortunately, closure-based tamings such as those for NodeList and CanvasRenderingContext2D are not automatically protected by this strategy.) @r5341

Patch Set 1 #

Total comments: 127

Patch Set 2 : Prevent host exceptions leaking through Domado in SES mode. #

Patch Set 3 : Prevent host exceptions leaking through Domado in SES mode. #

Patch Set 4 : Prevent host exceptions leaking through Domado in SES mode. #

Patch Set 5 : Prevent host exceptions leaking through Domado in SES mode. #

Patch Set 6 : Prevent host exceptions leaking through Domado in SES mode. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1115 lines, -881 lines) Patch
M src/com/google/caja/plugin/domado.js View 1 2 3 4 5 120 chunks +1068 lines, -877 lines 0 comments Download
M src/com/google/caja/plugin/es53-frame-group.js View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M src/com/google/caja/plugin/ses-frame-group.js View 1 2 3 4 5 3 chunks +37 lines, -2 lines 0 comments Download
M src/com/google/caja/plugin/taming-membrane.js View 1 2 3 4 5 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 15
kpreid2
11 years, 4 months ago (2013-01-22 23:21:57 UTC) #1
felix8a
btw, could you rebase this from trunk? merge conflict in domado.js
11 years, 4 months ago (2013-01-23 20:56:11 UTC) #2
kpreid2
In SES mode, if host code throws an exception and that exception is caught by ...
11 years, 4 months ago (2013-01-23 21:07:23 UTC) #3
kpreid2
On 2013/01/23 20:56:11, felix8a wrote: > btw, could you rebase this from trunk? merge conflict ...
11 years, 4 months ago (2013-01-23 21:07:37 UTC) #4
ihab.awad
https://codereview.appspot.com/7182049/diff/1/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): https://codereview.appspot.com/7182049/diff/1/src/com/google/caja/plugin/domado.js#newcode362 src/com/google/caja/plugin/domado.js:362: this.confide = cajaVM.def(function (object, taming, opt_sameAs) { Can you ...
11 years, 3 months ago (2013-01-25 00:38:33 UTC) #5
kpreid2
In SES mode, if host code throws an exception and that exception is caught by ...
11 years, 3 months ago (2013-01-30 01:34:32 UTC) #6
kpreid2
New snapshot. https://codereview.appspot.com/7182049/diff/1/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): https://codereview.appspot.com/7182049/diff/1/src/com/google/caja/plugin/domado.js#newcode362 src/com/google/caja/plugin/domado.js:362: this.confide = cajaVM.def(function (object, taming, opt_sameAs) { ...
11 years, 3 months ago (2013-01-30 01:35:34 UTC) #7
kpreid2
In SES mode, if host code throws an exception and that exception is caught by ...
11 years, 3 months ago (2013-02-22 15:29:41 UTC) #8
ihab.awad
lgtm
11 years, 3 months ago (2013-02-22 20:32:38 UTC) #9
felix8a
this has a some conflicts vs trunk in domado.js. could you please resolve and update ...
11 years, 2 months ago (2013-03-07 20:13:12 UTC) #10
kpreid2
In SES mode, if host code throws an exception and that exception is caught by ...
11 years, 2 months ago (2013-03-07 20:16:03 UTC) #11
kpreid2
On 2013/03/07 20:13:12, felix8a wrote: > this has a some conflicts vs trunk in domado.js. ...
11 years, 2 months ago (2013-03-07 20:16:43 UTC) #12
kpreid2
In SES mode, if host code throws an exception and that exception is caught by ...
11 years, 1 month ago (2013-03-26 16:35:53 UTC) #13
kpreid2
New snapshot (Patch Set 6) fixes a 4×-10× slowdown by avoiding using confidence.amplifying at run-time ...
11 years, 1 month ago (2013-03-26 16:38:41 UTC) #14
ihab.awad
11 years, 1 month ago (2013-03-27 19:41:07 UTC) #15
lgtm
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b