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

Issue 725101 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Null-dereference READ in gpu::Buffer::GetDataAddress

Project Member Reported by ClusterFuzz, May 22 2017

Issue description

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

Fuzzer: afl_gpu_fuzzer
Job Type: afl_chrome_asan
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x000000000018
Crash State:
  gpu::Buffer::GetDataAddress
  AsAtomic
  gpu::ServiceDiscardableHandle::ForceDelete
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=afl_chrome_asan&range=473023:473070

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


Issue filed automatically.

See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reproducing.md for more information.
 
Cc: msrchandra@chromium.org
Components: Internals>GPU>Internals
Labels: M-60 Test-Predator-Correct-CLs
Owner: ericrk@chromium.org
Status: Assigned (was: Untriaged)
Assigning to the concern owner from Predator results --
The result is a list of CLs that change the crashed files. 

Author: ericrk
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src/+/dc5eeaa0a9a5a7f9ff83a82ab8896740736ffc6b
Time: Fri May 19 02:23:50 2017
Lines 121 of file discardable_handle.cc which potentially caused crash are changed in this cl (frame #2, "gpu::ServiceDiscardableHandle::ForceDelete"). 

Files service_discardable_manager.cc, texture_manager.cc are changed in this cl (and is part of stack frame #3, "gpu::ServiceDiscardableManager::OnTextureDeleted")
Minimum distance from crash line to modified line: 0. (file: discardable_handle.cc, crashed on: 118, modified: 118).

@ericrk -- Could you please look into the issue, kindly re-assign if this is not related to your changes.
Thank You.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 6 2017

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

commit 838072e44f3a5d5856660d48837689d51eb18100
Author: Eric Karl <ericrk@chromium.org>
Date: Tue Jun 06 17:23:43 2017

Fix null dereference due to corrupted cmd buffer command.

Currently, passing a InitializeDiscardableTextureCHROMIUM command with
an invalid shared memory ID can lead to a nullptr dereference.

This change ensures that we only ever add entries to our discardable
manager if both the texture and shared mem ID are valid.

Bug:  725101 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I03b20d16376b42bbd3b9022aed69bcd1426e725a
Reviewed-on: https://chromium-review.googlesource.com/523670
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Eric Karl <ericrk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477315}
[modify] https://crrev.com/838072e44f3a5d5856660d48837689d51eb18100/gpu/command_buffer/common/discardable_handle.cc
[modify] https://crrev.com/838072e44f3a5d5856660d48837689d51eb18100/gpu/command_buffer/common/discardable_handle.h
[modify] https://crrev.com/838072e44f3a5d5856660d48837689d51eb18100/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/838072e44f3a5d5856660d48837689d51eb18100/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc

Project Member

Comment 3 by ClusterFuzz, Jun 7 2017

ClusterFuzz has detected this issue as fixed in range 477283:477334.

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

Fuzzer: afl_gpu_fuzzer
Job Type: afl_chrome_asan
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x000000000018
Crash State:
  gpu::Buffer::GetDataAddress
  AsAtomic
  gpu::ServiceDiscardableHandle::ForceDelete
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=afl_chrome_asan&range=473023:473070
Fixed: https://clusterfuzz.com/revisions?job=afl_chrome_asan&range=477283:477334

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


See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reproducing.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 4 by ClusterFuzz, Jun 7 2017

Labels: ClusterFuzz-Verified
Status: Verified (was: Assigned)
ClusterFuzz testcase 5257076044726272 is verified as fixed, so closing issue.

If this is incorrect, please add ClusterFuzz-Wrong label and re-open the issue.

Sign in to add a comment