This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Drop APNG frames that don't fit entirely within the destination surface. #56928
Merged
Conversation
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
zanderso
approved these changes
Dec 3, 2024
Member
zanderso
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm w/ test
Member
Author
|
There's another test with a malformed APNG I'm trying to work out a fix for. |
Member
Author
|
It wasn't malformed. I was using an invalid offset to check the default frame destination region. :^) |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 5, 2024
github-merge-queue bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Dec 5, 2024
…159842) flutter/engine@05e2d65...b4f52b2 2024-12-05 [email protected] Drop APNG frames that don't fit entirely within the destination surface. (flutter/engine#56928) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutteractionsbot
pushed a commit
to flutteractionsbot/engine
that referenced
this pull request
Dec 5, 2024
…ce. (flutter#56928) As per the [spec](https://www.w3.org/TR/png/#fcTL-chunk): > The frame must be rendered within the region defined by x_offset, y_offset, width, and height. This region may not fall outside of the default image; thus x_offset plus width must not be greater than the [IHDR](https://www.w3.org/TR/png/#11IHDR) width; similarly y_offset plus height must not be greater than the [IHDR](https://www.w3.org/TR/png/#11IHDR) height.
auto-submit bot
pushed a commit
that referenced
this pull request
Dec 6, 2024
The `offset + bounds` calculation in the bounds checks could wrap around, bypassing the check. (Follow up to #56928)
zanderso
pushed a commit
to zanderso/engine
that referenced
this pull request
Dec 9, 2024
…ce. (flutter#56928) As per the [spec](https://www.w3.org/TR/png/#fcTL-chunk): > The frame must be rendered within the region defined by x_offset, y_offset, width, and height. This region may not fall outside of the default image; thus x_offset plus width must not be greater than the [IHDR](https://www.w3.org/TR/png/#11IHDR) width; similarly y_offset plus height must not be greater than the [IHDR](https://www.w3.org/TR/png/#11IHDR) height.
zanderso
pushed a commit
to zanderso/engine
that referenced
this pull request
Dec 9, 2024
…#57025) The `offset + bounds` calculation in the bounds checks could wrap around, bypassing the check. (Follow up to flutter#56928)
5 tasks
auto-submit bot
pushed a commit
that referenced
this pull request
Dec 9, 2024
…tion surface. (#57062) This cherry-pick PR includes: #56928 followed by #57025 It supersedes #56978. ### Issue Link: What is the link to the issue this cherry-pick is addressing? Issue was reported over email. ### Changelog Description: Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples Fixes an out-of-bounds memory write in APNG decoding. ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch) Fixes an issue in which an untrusted malformed APNG image could cause out of bounds memory writes, crashing the app. ### Workaround: Is there a workaround for this issue? There is no workaround. ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? Attempt to load the APNG used in the tests in the PR.
nick9822
pushed a commit
to nick9822/flutter
that referenced
this pull request
Dec 18, 2024
…ce. (flutter/engine#56928) As per the [spec](https://www.w3.org/TR/png/#fcTL-chunk): > The frame must be rendered within the region defined by x_offset, y_offset, width, and height. This region may not fall outside of the default image; thus x_offset plus width must not be greater than the [IHDR](https://www.w3.org/TR/png/#11IHDR) width; similarly y_offset plus height must not be greater than the [IHDR](https://www.w3.org/TR/png/#11IHDR) height.
nick9822
pushed a commit
to nick9822/flutter
that referenced
this pull request
Dec 18, 2024
…/engine#57025) The `offset + bounds` calculation in the bounds checks could wrap around, bypassing the check. (Follow up to flutter/engine#56928)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects: engine
autosubmit
Merge PR when tree becomes green via auto submit App
cp: beta
cherry pick to the beta release candidate branch
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.
As per the spec: