New issue
Advanced search Search tips

Issue 787698 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

DCHECK failure in scope->is_module_scope() implies processor.result_assigned() in rewriter.cc

Project Member Reported by ClusterFuzz, Nov 22 2017

Issue description

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

Fuzzer: libFuzzer_javascript_parser_proto_fuzzer
Job Type: libfuzzer_chrome_asan_debug
Platform Id: linux

Crash Type: DCHECK failure
Crash Address: 
Crash State:
  scope->is_module_scope() implies processor.result_assigned() in rewriter.cc
  v8::internal::Rewriter::Rewrite
  v8::internal::Compiler::Analyze
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan_debug&range=510082:510099

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

Issue filed automatically.

See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reference.md for more information.
 
Project Member

Comment 1 by ClusterFuzz, Nov 22 2017

Components: Blink>JavaScript>Parser
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.

Comment 2 by marja@chromium.org, Nov 22 2017

Owner: marja@chromium.org
Umm, I get the "You (email=...) are not authorized to access this page!" with both marja@google.com and marja@chromium.org. What's up with that?

Trying to set myself as owner to see if that makes it work...

Anyhow, this looks like the second bug found by my new fuzzer. :)

Comment 3 by marja@chromium.org, Nov 22 2017

Cc: metzman@chromium.org mmoroz@chromium.org
Umm, the test case claims to be:

{ set :  try {  } catch ( a ) { b } finally { set } }

But that doesn't crash locally (not with the fuzzer and not with d8). It also looks relatively harmless.

I wonder why this doesn't repro locally. mmoroz, metzman, any ideas?

Comment 4 by titzer@chromium.org, Nov 22 2017

Marja, have you tried the clusterfuzz reproduce tool? You'll need a chromium checkout for that. I tried to download and unzip the build but ran out of disk space :(
Project Member

Comment 5 by sheriffbot@chromium.org, Nov 22 2017

Labels: M-64
Project Member

Comment 6 by sheriffbot@chromium.org, Nov 22 2017

Labels: ReleaseBlock-Stable
This is a serious security regression. If you are not able to fix this quickly, please revert the change that introduced it.

If this doesn't affect a release branch, or has not been properly classified for severity, please update the Security_Impact or Security_Severity labels, and remove the ReleaseBlock label. To disable this altogether, apply ReleaseBlock-NA.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 7 by sheriffbot@chromium.org, Nov 22 2017

Labels: Pri-1
Project Member

Comment 8 by sheriffbot@chromium.org, Nov 22 2017

Status: Assigned (was: Untriaged)

Comment 9 by marja@chromium.org, Nov 22 2017

Right, yes, that works, actually. And the printed out test case is actually exactly the one above (so it's not about any incompatible changes regarding the proto format or so).

It can be that this is depending on the V8 version...

But... still... whaat... somehow looks like that reproducer thing didn't change the V8 version in the working tree and I'm confused.
Also worth noting that this bug was found using debug build:

enable_nacl = false
ffmpeg_branding = "ChromeOS"
is_asan = true
is_debug = true
pdf_enable_xfa = true
proprietary_codecs = true
use_libfuzzer = true

Comment 11 by marja@chromium.org, Nov 23 2017

Now I'm having better luck reproing this... can repro w/ my fuzzer target program, can't repro with plain d8.

This is likely not regression; the blame range contains CLs which enhance my fuzzer to find cases like this.

Comment 12 by marja@chromium.org, Nov 23 2017

Cc: marja@chromium.org
Owner: neis@chromium.org
Ah, module vs script is not properly printed out by the native format input printer.

So the repro is:

{ set :  try {  } catch ( a ) { b } finally { set } }

ran with d8 --module.

Tentatively assigning to neis@, since this seems a case where modules differ from normal scripts (this doesn't crash for normal scripts).

Comment 13 by neis@chromium.org, Nov 23 2017

Status: Started (was: Assigned)

Comment 14 by neis@chromium.org, Nov 23 2017

Labels: -Type-Bug-Security -OS-Linux -Stability-Memory-AddressSanitizer -Restrict-View-SecurityTeam -Security_Impact-Head -Security_Severity-High -ReleaseBlock-Stable Type-Bug
This is unrelated to modules. A fix is at https://chromium-review.googlesource.com/#/c/v8/v8/+/787473.

The bug is not security relevant and not a regression either, removing some labels accordingly.
Project Member

Comment 15 by ClusterFuzz, Nov 24 2017

Labels: OS-Linux
Project Member

Comment 16 by bugdroid1@chromium.org, Nov 28 2017

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

commit aa7d1438df9efe36cdb25a5574659385dd9540cd
Author: Georg Neis <neis@chromium.org>
Date: Tue Nov 28 09:07:51 2017

[parsing] Fix bug in rewriter concerning a breakable try-finally.

R=adamk@chromium.org

Bug:  chromium:787698 
Change-Id: I873debe61b152a9e88ce22d95a69f27eab2d0f55
Reviewed-on: https://chromium-review.googlesource.com/787473
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49653}
[modify] https://crrev.com/aa7d1438df9efe36cdb25a5574659385dd9540cd/src/parsing/rewriter.cc
[modify] https://crrev.com/aa7d1438df9efe36cdb25a5574659385dd9540cd/test/mjsunit/es6/completion.js

Comment 17 by neis@chromium.org, Nov 28 2017

Status: Fixed (was: Started)
Project Member

Comment 18 by ClusterFuzz, Nov 29 2017

ClusterFuzz has detected this issue as fixed in range 519661:519672.

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

Fuzzer: libFuzzer_javascript_parser_proto_fuzzer
Job Type: libfuzzer_chrome_asan_debug
Platform Id: linux

Crash Type: DCHECK failure
Crash Address: 
Crash State:
  scope->is_module_scope() implies processor.result_assigned() in rewriter.cc
  v8::internal::Rewriter::Rewrite
  v8::internal::Compiler::Analyze
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan_debug&range=510082:510099
Fixed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan_debug&range=519661:519672

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

See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reference.md 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 19 by ClusterFuzz, Nov 29 2017

Labels: ClusterFuzz-Verified
Status: Verified (was: Fixed)
ClusterFuzz testcase 5092953914867712 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