Write and read beyond bounds caused by nsJPEGEncoder::emptyOutputBuffer()
Categories
(Core :: Graphics: ImageLib, enhancement, P1)
Tracking
()
People
(Reporter: mozillabugs, Assigned: aosmond)
Details
(Keywords: csectype-bounds, reporter-external, sec-moderate, Whiteboard: [adv-main78+])
Attachments
(4 files)
2.05 KB,
text/html
|
Details | |
6.91 KB,
text/plain
|
Details | |
47 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-release+
dveditz
:
sec-approval+
|
Details | Review |
281 bytes,
text/plain
|
Details |
Reporter | ||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
This is unlikely to manifest due to the pref settings and our limitations on the maximum surface size. But I have put together a patch to check allocation size.
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
•
|
||
Comment on attachment 9155948 [details]
Bug 1450353.
Security Approval Request
- How easily could an exploit be constructed based on the patch?: Somewhat hard. To overflow the encoder buffer, you would need a very large source surface, which we restrict the maximum size of, or combine it with a flaw in the JPEG encoder, to produce >2GB output.
- Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: Yes
- Which older supported branches are affected by this flaw?: All
- If not all supported branches, which bug introduced the flaw?: None
- Do you have backports for the affected branches?: No
- If not, how different, hard to create, and risky will they be?: Not hard, I think the patch will likely apply cleanly as this code doesn't change much.
- How likely is this patch to cause regressions; how much testing does it need?: Not likely, we are just adding a bounds check.
Reporter | ||
Comment 6•5 years ago
|
||
Hi. I cannot get my Phabricator account to work to review this patch. Can you find someone to delete the account so I can recreate it? Thanks.
Comment 7•5 years ago
|
||
Comment on attachment 9155948 [details]
Bug 1450353.
sec-approval+
Comment 8•5 years ago
|
||
https://hg.mozilla.org/integration/autoland/rev/955ac3fe48e84ef3814bd5053bb758608944cbb6
Please nominate this for Beta approval when you get a chance. It grafts cleanly as-landed. It does graft cleanly to ESR68 too, but I'm not sure this is really needed there given how close to EOL it is?
Comment 9•5 years ago
|
||
Changing the priority to p1 as the bug is tracked by a release manager for the current beta.
See What Do You Triage for more information
![]() |
||
Comment 10•5 years ago
|
||
https://hg.mozilla.org/integration/autoland/rev/955ac3fe48e84ef3814bd5053bb758608944cbb6
https://hg.mozilla.org/mozilla-central/rev/955ac3fe48e8
Assignee | ||
Comment 11•5 years ago
|
||
Comment on attachment 9155948 [details]
Bug 1450353.
Beta/Release Uplift Approval Request
- User impact if declined: Theoretical vulnerability to buffer overflow in the JPEG encoder
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): We are just adding a bounds check, low risk.
- String changes made/needed:
Comment 12•5 years ago
|
||
Comment on attachment 9155948 [details]
Bug 1450353.
approved for 78 rc1
Comment 13•5 years ago
|
||
uplift |
Updated•5 years ago
|
Updated•5 years ago
|
Comment 14•5 years ago
|
||
Updated•5 years ago
|
Updated•4 years ago
|
Updated•9 months ago
|
Description
•