-
Notifications
You must be signed in to change notification settings - Fork 6k
[CP-beta]Drop APNG frames that don't fit entirely within the destination surface. #56978
Conversation
…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 please fill out the PR description above, afterwards the release team will review this request. |
bdero
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
|
This will need a slight adjustment to account for overflow. Instead of rushing the partial fix in to the initial stable release, let's do the whole fix all at once even if it has to wait for the first hotfix. |
Per this comment, I'm going to request changes on the PR, so I know we're not blocking the release on it. |
christopherfujino
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.
Per #56978 (comment), this needs a change to account for overflow.
|
This is the patch to account for uint wrapping: #57025 |
|
Closing in favor of #57062 |
…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.
This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
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 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.