New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 715748 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug


Participants' hotlists:
Hotlist-AsmJsParser


Sign in to add a comment

V8 correctness failure in configs: x64,ignition:x64,ignition_asm

Project Member Reported by ClusterFuzz, Apr 26 2017

Issue description

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

Fuzzer: foozzie_js_mutation
Job Type: v8_foozzie
Platform Id: linux

Crash Type: V8 correctness failure
Crash Address: 
Crash State:
  configs: x64,ignition:x64,ignition_asm
  sources: 822
  
Sanitizer: address (ASAN)

Regressed: V8: 44685:44686

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


Issue filed automatically.

See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.
 
Owner: mstarzinger@chromium.org
Status: Assigned (was: Untriaged)
// Repro:
function __f_1(stdlib, foreign, heap) {
  "use asm";
  var __v_1 = new stdlib.Int32Array(heap);
  function __f_0(__v_0) {
    __v_0 = __v_0|0;
  }
  return { __f_0: __f_0};
}
__f_1(this, {}, new ArrayBuffer(1));

// Output:
# Compared x64,ignition with x64,ignition_asm
#
# Flags of x64,ignition:
--abort_on_stack_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --es-staging --random-seed 732681078 --ignition --turbo-filter=~ --hydrogen-filter=~ --nocrankshaft
# Flags of x64,ignition_asm:
--abort_on_stack_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --es-staging --random-seed 732681078 --ignition --turbo-filter=~ --hydrogen-filter=~ --nocrankshaft --validate-asm --fast-validate-asm --stress-validate-asm --suppress-asm-messages
#
# Difference:
- ./repro.js:3: RangeError: byte length of Int32Array should be a multiple of 4
#
# Source file:
none
#
### Start of configuration x64,ignition:
./repro.js:3: RangeError: byte length of Int32Array should be a multiple of 4
  var __v_1 = new stdlib.Int32Array(heap);
              ^



### End of configuration x64,ignition
#
### Start of configuration x64,ignition_asm:

### End of configuration x64,ignition_asm

Very similar to  issue 715505 , many aspects of the passed buffer are not validated during instantiation. Working on a fix.
Cc: bradnelson@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 27 2017

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

commit f6296b344e771e59b80a10f84f30e7a757823bf5
Author: Michael Starzinger <mstarzinger@chromium.org>
Date: Thu Apr 27 14:47:03 2017

[asm.js] Fix heap buffer checking during instantiation.

This makes sure that asm.js modules can only be instantiated with a
valid {ArrayBuffer} as the underlying heap buffer for all cases where
accepting anything else would be observably different from JavaScript
proper.

R=clemensh@chromium.org
TEST=mjsunit/asm/asm-memory
BUG= chromium:715505 , chromium:715748 

Change-Id: I355686200151c5667bf836824de922d657a8d943
Reviewed-on: https://chromium-review.googlesource.com/488521
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44938}
[modify] https://crrev.com/f6296b344e771e59b80a10f84f30e7a757823bf5/src/asmjs/asm-js.cc
[add] https://crrev.com/f6296b344e771e59b80a10f84f30e7a757823bf5/test/mjsunit/asm/asm-memory.js
[modify] https://crrev.com/f6296b344e771e59b80a10f84f30e7a757823bf5/test/mjsunit/wasm/asm-wasm.js

Status: Fixed (was: Assigned)
Project Member

Comment 6 by ClusterFuzz, Apr 28 2017

ClusterFuzz has detected this issue as fixed in range 44937:44938.

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

Fuzzer: foozzie_js_mutation
Job Type: v8_foozzie
Platform Id: linux

Crash Type: V8 correctness failure
Crash Address: 
Crash State:
  configs: x64,ignition:x64,ignition_asm
  sources: 822
  
Sanitizer: address (ASAN)

Regressed: V8: 44685:44686
Fixed: V8: 44937:44938

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


See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.

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

Sign in to add a comment