Repository navigation
[skia] Guard against overflow in blur code - #4968
Merged
Merged
Conversation
dahlstrom-g
added a commit
to dahlstrom-g/cobalt
that referenced
this pull request
Feb 25, 2025
Fixed: 398591179 Reviewed-on: youtube#4968
kaidokert
approved these changes
Mar 13, 2025
This fuzz creates a blur that has w = 1 and h = 2^31 - epsilon. And a filter sigma of 360. This causes the intermediate buffer size > 2^31. This causes the multiply in the following code SkMaskBlurFilter.cpp:1023: tmpStart + tmpW * tmpH to overflow. Because tmpW = source height, which is near 2^31, and tmpH is about 3*360. Cause the blur to fail if the intermediate buffer is > INT_MAX. (cherry picked from commit b70a030066b554b0fc7ba4c061449ac486a62283) Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558305
… by commit 1da0fc5. Issue: 398591179 Reviewed-on: youtube#4968
dahlstrom-g
force-pushed
the
OSV-2022-576
branch
from
March 13, 2025 18:00
8040c0a to
744299c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed: 398591179