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

Issue 668848 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug-Security


Sign in to add a comment

Use-after-poison in blink::EventListenerIterator::nextListener

Project Member Reported by ClusterFuzz, Nov 27 2016

Issue description

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=4696891016347648

Fuzzer: inferno_twister
Job Type: mac_asan_content_shell
Platform Id: mac

Crash Type: Use-after-poison READ 4
Crash Address: 0x7e9232a91294
Crash State:
  blink::EventListenerIterator::nextListener
  blink::EventTarget::traceWrappers
  blink::ScriptWrappableVisitor::AdvanceTracing
  
Recommended Security Severity: High

Regressed: https://cluster-fuzz.appspot.com/revisions?job=mac_asan_content_shell&range=434476:434480

Minimized Testcase (0.14 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv969tNjSREvwH9Cbrchsmyhz2sqaHfeqRRnbESukPPf6QP-IF3dj7G2X2VCluQl5hbkDIkzDAyCYnEjNjD3JpZ_V-CiHZkgqB6S-dD6q_fZlvTdf-OOysd7MY-Fw5e8N80MNGoaZYYdGP9b4TCxVQqo5z4nyEA?testcase_id=4696891016347648
<script>
    canvas = new OffscreenCanvas(10, 10);
    canvas.addEventListener("webglcontextlost", function() {
    });
gc()
gc()
</script>


Issue filed automatically.

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

Comment 1 by sheriffbot@chromium.org, Nov 27 2016

Labels: M-56
Project Member

Comment 2 by sheriffbot@chromium.org, Nov 27 2016

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

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

Comment 3 by sheriffbot@chromium.org, Nov 27 2016

Labels: Pri-1
Cc: haraken@chromium.org
Components: Blink>JavaScript>GC
Owner: mlippautz@chromium.org
Status: Assigned (was: Untriaged)
Hi mlippautz, it looks like this use-after-poison is happening during V8 garbage collection. Do you mind taking a look / retriaging? Thanks!
Blocking: 468240
Components: Blink>Bindings
Status: Started (was: Assigned)
Might be the crahser we observe in RegisterExternalReference which always gets passed the same value. Presumably we try to register the poison value.
Cc: jochen@chromium.org hlopko@chromium.org
Also repros on Linux

$ out/Debug/content_shell --single-process --no-sandbox  --run-layout-test  ~/Downloads/fuzz-29.html 2>&1 | tools/valgrind/asan/asan_symbolize.py 

Project Member

Comment 8 by sheriffbot@chromium.org, Nov 28 2016

Labels: M-56
Fix is in flight. We didn't trace all fields in oilpan and so we had a stale pointer on the next GC that traced from V8 (which didn't miss the field).
Project Member

Comment 10 by bugdroid1@chromium.org, Nov 28 2016

Cc: xidac...@chromium.org
Status: Fixed (was: Started)
Turns out this was not a bug in wrapper tracing but rather in an Oilpan usage introduced in 8372014fc16a378fc7452164db9b3b89fbd62909.

+xidachen: fyi, wrong tracing could've resulted in Oilpan dropping event listeners.
Cc: kbr@chromium.org
kbr: Maybe interesting since this bug could result in event listeners being lost (even without wrapper tracing).
Project Member

Comment 13 by ClusterFuzz, Nov 29 2016

ClusterFuzz has detected this issue as fixed in range 434636:434658.

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=4696891016347648

Fuzzer: inferno_twister
Job Type: mac_asan_content_shell
Platform Id: mac

Crash Type: Use-after-poison READ 4
Crash Address: 0x7e9232a91294
Crash State:
  blink::EventListenerIterator::nextListener
  blink::EventTarget::traceWrappers
  blink::ScriptWrappableVisitor::AdvanceTracing
  
Recommended Security Severity: High

Regressed: https://cluster-fuzz.appspot.com/revisions?job=mac_asan_content_shell&range=434476:434480
Fixed: https://cluster-fuzz.appspot.com/revisions?job=mac_asan_content_shell&range=434636:434658

Minimized Testcase (0.14 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv969tNjSREvwH9Cbrchsmyhz2sqaHfeqRRnbESukPPf6QP-IF3dj7G2X2VCluQl5hbkDIkzDAyCYnEjNjD3JpZ_V-CiHZkgqB6S-dD6q_fZlvTdf-OOysd7MY-Fw5e8N80MNGoaZYYdGP9b4TCxVQqo5z4nyEA?testcase_id=4696891016347648
<script>
    canvas = new OffscreenCanvas(10, 10);
    canvas.addEventListener("webglcontextlost", function() {
    });
gc()
gc()
</script>


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.
Project Member

Comment 14 by sheriffbot@chromium.org, Nov 29 2016

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify

Comment 15 by kbr@chromium.org, Nov 30 2016

Blocking: 630515 655270 610759
Labels: -ReleaseBlock-Beta -M-56 M-57
Project Member

Comment 17 by sheriffbot@chromium.org, Mar 7 2017

Labels: -Restrict-View-SecurityNotify allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

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

Sign in to add a comment