Closed
Bug 2021178
Opened 8 months ago
Closed 8 months ago
make buffer size validation functions in gfx/layers/ImageDataSerializer.h return Maybe<>
Categories
(Core :: Graphics, enhancement)
Core
Graphics
Tracking
()
RESOLVED
FIXED
150 Branch
People
(Reporter: tnikkel, Assigned: tschuster)
References
Details
(Keywords: sec-other, Whiteboard: [adv-main150-])
Attachments
(2 external files)
This is a followup to a review comment in bug 2020091.
We use various functions in ImageDataSerializer.h to validate buffer sizes (ComputeYCbCrBufferSize, ComputeRGBBufferSize, GetRGBStride, ComputeRGBStride, etc) which return 0 on error/overflow. Historically the code was not checking for 0 return value in some places (I already did an audit and fixed anything that didn't seem right). We should make it harder to not check for the error condition to avoid this happening again. Further, it was suggested we add logging/assertions in the error path.
| Assignee | ||
Updated•8 months ago
|
Assignee: nobody → tschuster
| Assignee | ||
Comment 1•8 months ago
|
||
| Assignee | ||
Updated•8 months ago
|
Summary: make buffer size validation functions in gfx/layers/ImageDataSerializer.h return Result<> or Maybe<> → make buffer size validation functions in gfx/layers/ImageDataSerializer.h return Maybe<>
Updated•8 months ago
|
status-firefox148:
--- → wontfix
status-firefox149:
--- → wontfix
status-firefox150:
--- → affected
status-firefox-esr115:
--- → wontfix
status-firefox-esr140:
--- → wontfix
| Assignee | ||
Updated•8 months ago
|
Keywords: leave-open
| Assignee | ||
Comment 2•8 months ago
|
||
I just updated all of the GetAligned functions to return Maybe<> and there seem to be quite a few places where we weren't checking for 0 at all.
| Assignee | ||
Comment 3•8 months ago
|
||
Pushed by tschuster@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/1dc03331dd13
https://hg.mozilla.org/integration/autoland/rev/96617faea688
Return Maybe<uint32_t> from Compute*BufferSize. r=tnikkel,media-playback-reviewers,padenot
https://github.com/mozilla-firefox/firefox/commit/601fafa65ba6
https://hg.mozilla.org/integration/autoland/rev/1ec4feda5059
Return Maybe<int32_t> from Get*Stride. r=tnikkel,media-playback-reviewers,webrtc-reviewers,webgpu-reviewers,bradwerth,ErichDonGubler,pehrsons,padenot
Comment 5•8 months ago
|
||
| Assignee | ||
Updated•8 months ago
|
| Assignee | ||
Updated•8 months ago
|
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Updated•8 months ago
|
tracking-firefox150:
--- → +
Updated•8 months ago
|
Group: gfx-core-security → core-security-release
Updated•7 months ago
|
QA Whiteboard: [sec] [qa-triage-done-c151/b150]
Updated•7 months ago
|
Whiteboard: [adv-main150-]
Updated•2 months ago
|
Group: core-security-release
You need to log in
before you can comment on or make changes to this bug.
Description
•