New issue
Advanced search Search tips

Issue 897098 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Oct 23
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

DCHECK failure in !is_the_hole(index) in fixed-array-inl.h

Reported by cloudfuz...@gmail.com, Oct 19

Issue description

VULNERABILITY DETAILS
The following testcases crashes the latest Debug build of d8 on ARM64

VERSION
Chrome Version: v8 trunk
Operating System: Linux on ARM64

REPRODUCTION CASE

o36=[1.1,2.2,3.3];
o12 = {};
o12.toString=function() {o36.pop();}
o12['__lookupSetter__'](o12,1);
o36['includes'](13,o12,2097150);

FOR CRASHES, PLEASE INCLUDE THE FOLLOWING ADDITIONAL INFORMATION
Type of crash: Crash due to assertion

#
# Fatal error in ../../src/objects/fixed-array-inl.h, line 174
# Debug check failed: !is_the_hole(index).
#
#
#
#FailureMessage Object: 0x7fdaaabef0
==== C stack trace ===============================

    ./d8(v8::base::debug::StackTrace::StackTrace()+0x18) [0x556492d478]
    ./d8(+0x185432c) [0x556466732c]
    ./d8(V8_Fatal(char const*, int, char const*, ...)+0x1d4) [0x556465e1c4]
    ./d8(std::__1::enable_if<(!(std::is_function<std::__1::remove_pointer<char>::type>::value)) && (has_output_operator<char>::value), void>::type v8::base::PrintCheckOperand<char>(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char)+0) [0x556465de50]
    ./d8(v8::internal::FixedDoubleArray::get_scalar(int)+0x11c) [0x55633f71cc]
    ./d8(+0x9e5634) [0x55637f8634]
    ./d8(+0xe8435c) [0x5563c9735c]
    ./d8(+0x153d708) [0x5564350708]


 
Project Member

Comment 1 by ClusterFuzz, Oct 19

ClusterFuzz is analyzing your testcase. Developers can follow the progress at https://clusterfuzz.com/testcase?key=6233928351088640.
Project Member

Comment 2 by ClusterFuzz, Oct 19

Summary: DCHECK failure in !is_the_hole(index) in fixed-array-inl.h (was: Security: Debug check failed: !is_the_hole(index).)
Detailed report: https://clusterfuzz.com/testcase?key=6233928351088640

Job Type: linux_asan_d8_dbg
Platform Id: linux

Crash Type: DCHECK failure
Crash Address: 
Crash State:
  !is_the_hole(index) in fixed-array-inl.h
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_asan_d8_dbg&range=45323:45324

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6233928351088640

See https://github.com/google/clusterfuzz-tools for more information.
Project Member

Comment 3 by ClusterFuzz, Oct 19

Components: Blink>JavaScript
Labels: Test-Predator-Auto-Components
Automatically applying components based on crash stacktrace and information from OWNERS files.

If this is incorrect, please apply the Test-Predator-Wrong-Components label.
Project Member

Comment 4 by ClusterFuzz, Oct 19

Labels: Test-Predator-Auto-Owner
Owner: tebbi@chromium.org
Status: Assigned (was: Unconfirmed)
Automatically assigning owner based on suspected regression changelist https://chromium.googlesource.com/v8/v8/+/cd33ec554285b7d0299d636ccebe539c85fd700a ([runtime] avoid trim/grow loop when adding and removing one element).

If this is incorrect, please let us know why and apply the Test-Predator-Wrong-CLs label. If you aren't the correct owner for this issue, please unassign yourself as soon as possible so it can be re-triaged.
Cc: ishell@chromium.org
Labels: M-71 Security_Impact-Stable Target-71 Pri-1
Tobias, is this a security vulnerability, if not please remove security tags and change Type-Bug-Security -> Type-Bug.
Labels: Security_Severity-High
Cc: ca...@igalia.com jkummerow@chromium.org
Labels: -Restrict-View-SecurityTeam -Security_Impact-Stable -Security_Severity-High
I'm confident this is not a security issue. It is just a correctness issue in weird and probably rare circumstances.
I described the root cause in my WIP fix: https://chromium-review.googlesource.com/c/v8/v8/+/1293571
Labels: -Type-Bug-Security Type-Bug
Project Member

Comment 10 by bugdroid1@chromium.org, Oct 23

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/5b92f91ccdfedb3fed03d3bbaa8fec2d99520b98

commit 5b92f91ccdfedb3fed03d3bbaa8fec2d99520b98
Author: Tobias Tebbi <tebbi@chromium.org>
Date: Tue Oct 23 09:07:37 2018

[elements] handle OOB-holes in Array.prototype.includes fast-path

In the ElementsAccessor fast-path for Array.prototype.includes, we
iterate backing-store elements according to start and length numbers
which might or might not be within the JSArray::length field, for
example when side-effects changed the receiver while start and length
are computed. So even when we have a packed ElementsKind, we might still
observe the hole. This is fine, since logical out-of-bounds accesses
are safe in this case, but it means we must not rely on the
ElementsKind telling us if we can encounter holes.

Bug:  chromium:897098 
Change-Id: I17db38246aef6edbdd5cee30598cbf7619aba6d8
Reviewed-on: https://chromium-review.googlesource.com/c/1293571
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56884}
[modify] https://crrev.com/5b92f91ccdfedb3fed03d3bbaa8fec2d99520b98/src/elements.cc
[add] https://crrev.com/5b92f91ccdfedb3fed03d3bbaa8fec2d99520b98/test/mjsunit/regress/regress-crbug-897098.js

Status: Fixed (was: Assigned)
Project Member

Comment 12 by ClusterFuzz, Oct 24

ClusterFuzz has detected this issue as fixed in range 56883:56884.

Detailed report: https://clusterfuzz.com/testcase?key=6233928351088640

Job Type: linux_asan_d8_dbg
Platform Id: linux

Crash Type: DCHECK failure
Crash Address: 
Crash State:
  !is_the_hole(index) in fixed-array-inl.h
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_asan_d8_dbg&range=45323:45324
Fixed: https://clusterfuzz.com/revisions?job=linux_asan_d8_dbg&range=56883:56884

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6233928351088640

See https://github.com/google/clusterfuzz-tools for more information.

If you suspect that the result above is incorrect, try re-doing that job on the test case report page.
Project Member

Comment 13 by ClusterFuzz, Oct 24

Labels: ClusterFuzz-Verified
Status: Verified (was: Fixed)
ClusterFuzz testcase 6233928351088640 is verified as fixed, so closing issue as verified.

If this is incorrect, please add ClusterFuzz-Wrong label and re-open the issue.

Sign in to add a comment