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

Issue 627374 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug



Sign in to add a comment

Crash in blink::ImageBitmapRenderingContext::transferFromImageBitmap

Project Member Reported by ClusterFuzz, Jul 12 2016

Issue description

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

Fuzzer: inferno_layout_test_unmodified
Job Type: windows_syzyasan_content_shell
Platform Id: windows

Crash Type: UNKNOWN
Crash Address: 0x00000003
Crash State:
  blink::ImageBitmapRenderingContext::transferFromImageBitmap
  blink::ImageBitmapRenderingContextV8Internal::transferFromImageBitmapMethod
  v8::internal::FunctionCallbackArguments::Call
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=windows_syzyasan_content_shell&range=404345:404363

Minimized Testcase (0.36 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv941wUezLQ2E5gGvt_iAUnykumwM6Xz3hagTOLep_Vc7ZK0Tsu3JYGS3M1nMs4oR3_eeq2lgfp4OsNOluInxjHxg2jwWmJ1_r4kKEiJKRql7vATmv4OvzBoFImWa8aED52H0cJi6d071HEFdM-SEQe3MGL9QsA?testcase_id=5281397355053056
<canvas id="output">
  <script>


__v_5 = 102;
__v_4 = 100;
__v_0 = new OffscreenCanvas(__v_5, __v_4);
var __v_6 = __v_0.getContext('webgl');
__v_1 = __v_0.transferToImageBitmap();
__v_1 = __v_0.transferToImageBitmap();
__v_3 = document.getElementById("output");
__v_2 = __v_3.getContext('bitmaprenderer');
__v_2.transferFromImageBitmap(__v_1);


</script>


Filer: kavvaru

See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.
 
Components: Internals>Skia Tools>Test>FindIt>NoResult
Labels: Te-Logged M-53
Owner: fmalita@chromium.org
Status: Assigned (was: Available)
Findit could not find any suspected CLs.

Through code search on file ImageBitmapRenderingContext.cpp seen some recent changes done by @fmalita.Hence assigning.

fmalita@ Could you please look into this issue if it is related to your change,else please route this to an appropriate owner for this issue.

Thanks,
Project Member

Comment 3 by sheriffbot@chromium.org, Jul 12 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: fmalita@chromium.org junov@chromium.org
Owner: xidac...@chromium.org
Unfortunately I cannot repro on my workstation.

But it looks pretty straightforward: null-pointer deref in ImageBitmapRenderingContext::transferFromImageBitmap()
(https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp?rcl=0&l=35).

StaticBitmap::imageForCurrentFrame() can now return nullptr for various reasons, and we need to handle that case in transferFromImageBitmap().
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 13 2016

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

commit cf378d00d56930dabf6c4cc4d141f9f2d3803a59
Author: xidachen <xidachen@chromium.org>
Date: Wed Jul 13 12:54:35 2016

Return a transparent black ImageBitmap when mailbox is invalid

In Webgl's transferToImageBitmap(), we create an ImageBitmap from the
drawingBuffer's mailbox. When calling transferToImageBitmap() twice, the
mailbox is invalid in the second call. In this case, we should return
an ImageBitmap that is the same size as the drawingBuffer but should be
transparent black.

Corresponding layout test has been updated to reflect this case.

BUG= 627374 
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2139353003
Cr-Commit-Position: refs/heads/master@{#405132}

[modify] https://crrev.com/cf378d00d56930dabf6c4cc4d141f9f2d3803a59/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap-expected.html
[add] https://crrev.com/cf378d00d56930dabf6c4cc4d141f9f2d3803a59/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap-invalid-mailbox-expected.html
[add] https://crrev.com/cf378d00d56930dabf6c4cc4d141f9f2d3803a59/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap-invalid-mailbox.html
[modify] https://crrev.com/cf378d00d56930dabf6c4cc4d141f9f2d3803a59/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap.html
[modify] https://crrev.com/cf378d00d56930dabf6c4cc4d141f9f2d3803a59/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 13 2016

Labels: merge-merged-2795
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cf378d00d56930dabf6c4cc4d141f9f2d3803a59

commit cf378d00d56930dabf6c4cc4d141f9f2d3803a59
Author: xidachen <xidachen@chromium.org>
Date: Wed Jul 13 12:54:35 2016

Return a transparent black ImageBitmap when mailbox is invalid

In Webgl's transferToImageBitmap(), we create an ImageBitmap from the
drawingBuffer's mailbox. When calling transferToImageBitmap() twice, the
mailbox is invalid in the second call. In this case, we should return
an ImageBitmap that is the same size as the drawingBuffer but should be
transparent black.

Corresponding layout test has been updated to reflect this case.

BUG= 627374 
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2139353003
Cr-Commit-Position: refs/heads/master@{#405132}

[modify] https://crrev.com/cf378d00d56930dabf6c4cc4d141f9f2d3803a59/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap-expected.html
[add] https://crrev.com/cf378d00d56930dabf6c4cc4d141f9f2d3803a59/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap-invalid-mailbox-expected.html
[add] https://crrev.com/cf378d00d56930dabf6c4cc4d141f9f2d3803a59/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap-invalid-mailbox.html
[modify] https://crrev.com/cf378d00d56930dabf6c4cc4d141f9f2d3803a59/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap.html
[modify] https://crrev.com/cf378d00d56930dabf6c4cc4d141f9f2d3803a59/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Status: Fixed (was: Assigned)
Components: -Tools>Test>FindIt>NoResult
Project Member

Comment 9 by sheriffbot@chromium.org, Nov 22 2016

Labels: -Restrict-View-EditIssue
Removing EditIssue view restrictions from ClusterFuzz filed bugs. If you believe that this issue should still be restricted, please reapply the label.

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

Sign in to add a comment