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

Issue 1492923002: [proxies] do not leak private symbols to proxy traps (Closed)

Created:
5 years ago by caitp (gmail)
Modified:
5 years ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[proxies] do not leak private symbols to proxy traps BUG=v8:4537 LOG=N R=neis@chromium.org, rossberg@chromium.org, jkummerow@chromium.org Committed: https://crrev.com/3ed71daff4f378e9562ef28ae6077829e3c4bd7e Cr-Commit-Position: refs/heads/master@{#32570}

Patch Set 1 #

Patch Set 2 : Prevent leaks to more hooks, and do the check before checking revoked status #

Patch Set 3 : More tests + cleanup fix #

Total comments: 3

Patch Set 4 : Test fixups #

Patch Set 5 : Move check to LookupIterator #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -2 lines) Patch
M src/lookup.cc View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M test/mjsunit/harmony/proxies-get.js View 1 2 3 4 2 chunks +25 lines, -1 line 0 comments Download

Messages

Total messages: 42 (8 generated)
caitp (gmail)
quick fix for this issue, will add more meaningful tests shortly
5 years ago (2015-12-02 18:49:53 UTC) #1
caitp (gmail)
more tests have been added, PTAL
5 years ago (2015-12-03 11:41:56 UTC) #3
neis
Thanks, lgtm. Minor comments below. https://codereview.chromium.org/1492923002/diff/40001/test/mjsunit/harmony/proxies-define-property.js File test/mjsunit/harmony/proxies-define-property.js (right): https://codereview.chromium.org/1492923002/diff/40001/test/mjsunit/harmony/proxies-define-property.js#newcode89 test/mjsunit/harmony/proxies-define-property.js:89: { value: "value2", configurable: ...
5 years ago (2015-12-03 12:01:24 UTC) #5
caitp (gmail)
On 2015/12/03 12:01:24, neis wrote: > Thanks, lgtm. Minor comments below. > > https://codereview.chromium.org/1492923002/diff/40001/test/mjsunit/harmony/proxies-define-property.js > ...
5 years ago (2015-12-03 13:03:39 UTC) #6
Jakob Kummerow
I'm surprised that we even need these extra checks. Can you explain why? Is there ...
5 years ago (2015-12-03 14:14:00 UTC) #8
caitp (gmail)
On 2015/12/03 14:14:00, Jakob wrote: > I'm surprised that we even need these extra checks. ...
5 years ago (2015-12-03 14:15:21 UTC) #9
Toon Verwaest
What about never returning JSPROXY in the LookupIterator if name is private?
5 years ago (2015-12-03 14:20:15 UTC) #10
rossberg
lgtm
5 years ago (2015-12-03 14:30:01 UTC) #11
Jakob Kummerow
Not lgtm. The fix Toon has in mind (and I agree with) is the following: ...
5 years ago (2015-12-03 14:31:29 UTC) #12
caitp (gmail)
On 2015/12/03 14:31:29, Jakob wrote: > Not lgtm. > > The fix Toon has in ...
5 years ago (2015-12-03 14:39:09 UTC) #13
Jakob Kummerow
OK, LGTM.
5 years ago (2015-12-03 14:40:14 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1492923002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1492923002/80001
5 years ago (2015-12-03 14:43:23 UTC) #18
rossberg
I don't think the latest change is correct. Not all property accesses are lookups, so ...
5 years ago (2015-12-03 14:49:53 UTC) #19
caitp (gmail)
On 2015/12/03 14:49:53, rossberg wrote: > I don't think the latest change is correct. Not ...
5 years ago (2015-12-03 14:51:17 UTC) #20
Jakob Kummerow
On 2015/12/03 14:49:53, rossberg wrote: > I don't think the latest change is correct. Not ...
5 years ago (2015-12-03 14:51:42 UTC) #21
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years ago (2015-12-03 15:04:29 UTC) #23
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/3ed71daff4f378e9562ef28ae6077829e3c4bd7e Cr-Commit-Position: refs/heads/master@{#32570}
5 years ago (2015-12-03 15:05:12 UTC) #25
rossberg
On 2015/12/03 14:51:42, Jakob wrote: > On 2015/12/03 14:49:53, rossberg wrote: > > I don't ...
5 years ago (2015-12-03 15:31:48 UTC) #26
Toon Verwaest
So I don't understand what you are saying. How can you do a property access ...
5 years ago (2015-12-03 15:36:22 UTC) #27
rossberg
On 2015/12/03 15:36:22, Toon Verwaest wrote: > So I don't understand what you are saying. ...
5 years ago (2015-12-03 15:37:28 UTC) #28
rossberg
On 2015/12/03 15:37:28, rossberg wrote: > On 2015/12/03 15:36:22, Toon Verwaest wrote: > > So ...
5 years ago (2015-12-03 15:40:19 UTC) #29
caitp (gmail)
On 2015/12/03 15:40:19, rossberg wrote: > On 2015/12/03 15:37:28, rossberg wrote: > > On 2015/12/03 ...
5 years ago (2015-12-03 15:41:38 UTC) #30
Toon Verwaest
We don't care about those cases really since it's not a property access. That's like ...
5 years ago (2015-12-03 15:43:04 UTC) #31
Toon Verwaest
Object.defineProperty = function(o, k, v) { leak(k); } yay :)
5 years ago (2015-12-03 15:45:20 UTC) #32
Jakob Kummerow
Caitlin, whenever %CreatePrivateSymbol() is involved, all bets are off anyway, and that's never the case ...
5 years ago (2015-12-03 16:00:52 UTC) #33
caitp (gmail)
I was just pointing out that it can still leak. So it means that it's ...
5 years ago (2015-12-03 16:02:22 UTC) #34
rossberg
I think there is some confusion here. Our internal code performs %CreatePrivateSymbol, and adds those ...
5 years ago (2015-12-03 16:18:50 UTC) #35
Toon Verwaest
As far as I can tell the only allowed operations with private symbols are HAS_PRIVATE ...
5 years ago (2015-12-03 16:38:49 UTC) #36
rossberg
It sounds like you saying that it doesn't matter to break the semantics because there ...
5 years ago (2015-12-03 16:46:34 UTC) #37
Toon Verwaest
What I'm saying is that by design there's a limited set of operations to which ...
5 years ago (2015-12-03 17:05:16 UTC) #38
Toon Verwaest
I think for SetProperty my suggested approach doesn't work. You'll hit the ASSERT at https://code.google.com/p/chromium/codesearch#chromium/src/v8/src/objects.cc&rcl=1449088040&l=4163
5 years ago (2015-12-03 19:33:13 UTC) #39
rossberg
What I'm saying is that there must not be any way for user code to ...
5 years ago (2015-12-03 19:36:08 UTC) #40
Toon Verwaest
So e.g., privateSymbol.x should be guaranteed to not cause a getter / proxy-get-trap to be ...
5 years ago (2015-12-03 19:50:56 UTC) #41
Toon Verwaest
5 years ago (2015-12-03 19:52:59 UTC) #42
Message was sent while issue was closed.
The question is: when do they work correctly? Afaik there's no (complete) ES6
extension for them.

Powered by Google App Engine
This is Rietveld 408576698