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

Issue 707595 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
OOO until 2019-02-10
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug-Security



Sign in to add a comment

Heap-use-after-free in v8::internal::libc_memcpy

Project Member Reported by ClusterFuzz, Apr 2 2017

Issue description

Cc: bmeu...@chromium.org
Components: Blink>JavaScript
Labels: Pri-1
Owner: petermarshall@chromium.org
Status: Assigned (was: Untriaged)
Hi Peter, ClusterFuzz picked up that your CL (https://chromium.googlesource.com/v8/v8.git/+/a450c18544df40f7c7cbed206a7cdd1ed38853aa) introduced the lines that cause this crash. Can you take a look please?
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 3 2017

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

commit c5ad59f4d4afdd849bcb4fe74894e18cdafd27de
Author: Peter Marshall <petermarshall@chromium.org>
Date: Mon Apr 03 12:45:22 2017

[builtins] Use length field in TypedArrayConstructByArrayLike.

The byte_length field of the TypedArray is not set to 0 on neutering,
but JSArrayBufferView::byte_length() returns 0 if WasNeutered() is
true. We should use the length property here instead.

We can just short-circuit if the length is 0. Added checks to the
memcpy path that assert length and neutered status are sane.

Bug: chromium:707472 , chromium:707595 , chromium:707364 , chromium:707410 

Change-Id: Ia1dec53f175357673012cbbc5e2fc40207e03623
Reviewed-on: https://chromium-review.googlesource.com/465987
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44336}
[modify] https://crrev.com/c5ad59f4d4afdd849bcb4fe74894e18cdafd27de/src/builtins/builtins-typedarray-gen.cc
[add] https://crrev.com/c5ad59f4d4afdd849bcb4fe74894e18cdafd27de/test/mjsunit/regress-707410.js

Project Member

Comment 4 by sheriffbot@chromium.org, Apr 3 2017

Labels: M-59
Project Member

Comment 5 by sheriffbot@chromium.org, Apr 3 2017

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 6 by ClusterFuzz, Apr 4 2017

ClusterFuzz has detected this issue as fixed in range 461468:461491.

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

Fuzzer: ochang_domfuzzer
Job Type: linux_tsan_chrome_mp
Platform Id: linux

Crash Type: Heap-use-after-free READ 8
Crash Address: 0x7b100003c040
Crash State:
  v8::internal::libc_memcpy
  v8::internal::Execution::TryCall
  v8::internal::Isolate::PromiseReactionJob
  
Sanitizer: thread (TSAN)

Recommended Security Severity: High

Regressed: https://clusterfuzz.com/revisions?job=linux_tsan_chrome_mp&range=461086:461121
Fixed: https://clusterfuzz.com/revisions?job=linux_tsan_chrome_mp&range=461468:461491

Reproducer Testcase: https://clusterfuzz.com/download/AMIfv949KqBXqua32M-FFX_reTe_nOfNgXsXjkm3JN9KEPiSA_icaDPCTGuWUyy8jrKew-8B7j2Dgv2EOTgTgghKQ0h1C_TOZ1GWUWjJJGpcEGJSIgHRdgNahlcvUae-bYV6SD5CnRITtDhUVUXcoLhXNiPomdjW6B8fNWM41mVi20b1Iud-96Rsg2rJoAq8FQxaBzoXArmri1whH9jD6DkceefQtWEI0B5K3GOfOOhNEY4UG7e4OO1RDbMvRTlBE0niy7irdBa7l0F2TvnncTfGBu_1QA2Ye2NNsN1wpJ3ALR6WtUtBQSjBaaLCHJttxkmSwYHl3xC12Y-cWSIj04ns8IKrSRGf9ySrZQTY99DnmYKXXjKCZj6QURAo7w-856NhsuXLbTdnI0maSgyGTsFTsM6JX4_x9g?testcase_id=4609906759172096


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.
Status: Fixed (was: Started)
Project Member

Comment 8 by sheriffbot@chromium.org, Apr 4 2017

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Labels: -ReleaseBlock-Beta
Project Member

Comment 10 by sheriffbot@chromium.org, Jul 11 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