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

Issue 2694783002: [builtins] treat all elements of detached TypedArray as undefined in A.p.includes (Closed)

Created:
3 years, 10 months ago by caitp
Modified:
3 years, 9 months ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[builtins] treat all elements of detached TypedArray as undefined in A.p.includes If a TypedArray's buffer is neutered during elements processing, do not access actual elements (which is a UAF and potential security issue), but instead treat each element as undefined, and return true if searching for undefined. This seems to match the behaviour of v8 prior to porting A.p.includes to C++ BUG=chromium:691323 R=cbruni@chromium.org, jkummerow@chromium.org, littledan@chromium.org

Patch Set 1 #

Patch Set 2 : fix a typo #

Patch Set 3 : Don't throw, but treat all elements as undefined instead, the way it used to work #

Patch Set 4 : also respect startFrom vs length #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -1 line) Patch
M src/elements.cc View 1 2 3 1 chunk +10 lines, -1 line 0 comments Download
A test/mjsunit/es7/regress/regress-691323-includes-typedarray.js View 1 2 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (19 generated)
caitp
PTAL
3 years, 10 months ago (2017-02-13 15:55:00 UTC) #3
caitp
On 2017/02/13 15:55:00, caitp wrote: > PTAL Per discussion offline (and on another similar CL), ...
3 years, 10 months ago (2017-02-13 19:08:20 UTC) #13
Dan Ehrenberg
lgtm
3 years, 10 months ago (2017-02-13 19:10:10 UTC) #14
Camillo Bruni
lgtm
3 years, 10 months ago (2017-02-15 13:37:10 UTC) #23
caitp
On 2017/02/15 13:37:10, Camillo Bruni wrote: > lgtm I think you should land your version, ...
3 years, 10 months ago (2017-02-15 13:39:33 UTC) #24
Camillo Bruni
3 years, 10 months ago (2017-02-16 09:58:08 UTC) #25
On 2017/02/15 at 13:39:33, caitp wrote:
> On 2017/02/15 13:37:10, Camillo Bruni wrote:
> > lgtm
> 
> I think you should land your version, the WasNeutered helper is cleaner than
this, + I believe yours isn't failing tests the due to the
DisallowHeapAllocation thing like this one is

ok, will fix mine

Powered by Google App Engine
This is Rietveld 408576698