New issue
Advanced search Search tips

Issue 879226 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Sep 15
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Security



Sign in to add a comment

Crash in es2::Texture2D::getFormat

Project Member Reported by ClusterFuzz, Aug 30

Issue description

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

Fuzzer: libFuzzer_gpu_swiftshader_fuzzer
Job Type: libfuzzer_chrome_asan
Platform Id: linux

Crash Type: UNKNOWN READ
Crash Address: 0x6120000584e0
Crash State:
  es2::Texture2D::getFormat
  es2::GenerateMipmap
  gpu::gles2::GLES2DecoderImpl::DoGenerateMipmap
  
Sanitizer: address (ASAN)

Recommended Security Severity: Medium

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=587263:587264

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

Issue filed automatically.

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

Comment 1 by ClusterFuzz, Aug 30

Components: Internals>GPU>Internals Internals>GPU>SwiftShader
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.
Project Member

Comment 2 by ClusterFuzz, Aug 30

Labels: Test-Predator-Auto-Owner
Owner: zmo@chromium.org
Status: Assigned (was: Untriaged)
Automatically assigning owner based on suspected regression changelist https://chromium.googlesource.com/chromium/src/+/385508dc888ef15d272cdd2705b17996abc519d6 (Implement immutable texture base/max level clamping).

If this is incorrect, please let us know why and apply the Test-Predator-Wrong-CLs label. If you aren't the correct owner for this issue, please unassign yourself as soon as possible so it can be re-triaged.
Cc: capn@chromium.org
Cc: -capn@chromium.org zmo@chromium.org sugoi@chromium.org
Owner: capn@chromium.org
This is inside SwiftShader. capn@: could you take a look?
Project Member

Comment 5 by sheriffbot@chromium.org, Aug 31

Labels: Target-70 M-70
Project Member

Comment 6 by sheriffbot@chromium.org, Aug 31

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, Aug 31

Labels: Pri-1
Status: Started (was: Assigned)
This appears to be caused by the texture's base level index being larger than the array of images.

That would definitely be a SwiftShader bug (we need to clamp it, or whatever the spec expects), but there might also be a Chromium-side issue where previously this was prevented by the command buffer validation and now it's exposed.

@zmo could you check if https://chromium-review.googlesource.com/1194994 has an off-by-one bug or something like that?
I didn't change the clamping, only now I store the clamped values to use later.

What happens (educated guess) could be: before we have base level out of range. But according to clamping rule for immutable textures, there is at least one level valid. So before we could also exclude that level, but now because we use the clamped value, this level is in the range, therefore calling into lower driver, which in turn exposes a bug in lower driver.
If you already reduced a few gl calls that leads to the crash, please share and I can take another look.
Project Member

Comment 11 by sheriffbot@chromium.org, Sep 5

Labels: -Security_Impact-Head Security_Impact-Beta
Cc: -sugoi@chromium.org capn@chromium.org
Labels: OS-Mac OS-Windows
Owner: sugoi@chromium.org
Should be fixed by Alexis' patch: https://swiftshader-review.googlesource.com/20488

This is marked as M-70, but I don't think a merge is necessary. Well-formed WebGL apps are not affected. The security impact seems limited to crashing the GPU process, which is considered unsafe/crashable anyway.
Project Member

Comment 13 by ClusterFuzz, Sep 15

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

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

Comment 14 by ClusterFuzz, Sep 16

ClusterFuzz has detected this issue as fixed in range 591377:591378.

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

Fuzzer: libFuzzer_gpu_swiftshader_fuzzer
Job Type: libfuzzer_chrome_asan
Platform Id: linux

Crash Type: UNKNOWN READ
Crash Address: 0x6120000584e0
Crash State:
  es2::Texture2D::getFormat
  es2::GenerateMipmap
  gpu::gles2::GLES2DecoderImpl::DoGenerateMipmap
  
Sanitizer: address (ASAN)

Recommended Security Severity: Medium

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=587263:587264
Fixed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_asan&range=591377:591378

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

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 15 by sheriffbot@chromium.org, Sep 16

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Labels: -ReleaseBlock-Stable -Target-70 -M-70 Target-71 M-71
Project Member

Comment 17 by sheriffbot@chromium.org, Dec 22

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