Closed Bug 1323877 Opened 6 years ago Closed 6 years ago

allow multipart images to receive no OnDataAvailable calls


(Core :: Graphics: ImageLib, defect)

Not set



Tracking Status
firefox52 + fixed
firefox53 --- fixed


(Reporter: tnikkel, Assigned: tnikkel)



(Keywords: sec-audit, Whiteboard: [post-critsmash-triage][adv-main52-])


(1 file)

Bug 1320899 exposed some problems in the networking code with multipart images. Sometimes it would fail to send an OnDataAvailable call. I'm not sure if it is guaranteed that we will always get an OnDataAvailable call (say if the part had 0 bytes) so we should make imagelib deal with that case. Currently imagelib gets confused if this happens.

Filing as security to be safe, I haven't thought through if it actually is.
Attached patch patchSplinter Review
Assignee: nobody → tnikkel
Attachment #8819111 - Flags: review?(aosmond)
Attachment #8819111 - Flags: review?(aosmond) → review+
Group: core-security → gfx-core-security
Comment on attachment 8819111 [details] [diff] [review]

[Security approval request comment]
How easily could an exploit be constructed based on the patch?

I'm not sure if this is a security issue or not. It will cause an assert, but I'm not sure if things can get worse. It would take a lot of thinking to figure out what the exact impact is.

Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?

The code comment describes the problem pretty clearly. I could leave it out and land later.

Which older supported branches are affected by this flaw?


If not all supported branches, which bug introduced the flaw?

Bug 1112972 rewrote most of the multipart image code. The previous code could have had the same bug though.

Do you have backports for the affected branches? If not, how different, hard to create, and risky will they be?


How likely is this patch to cause regressions; how much testing does it need?

should be fairly safe, some time baking would be good
Attachment #8819111 - Flags: sec-approval?
Keywords: sec-audit
Comment on attachment 8819111 [details] [diff] [review]

we may want to uplift this, to aurora at least, just to be safe.
Attachment #8819111 - Flags: sec-approval? → sec-approval+
[Tracking Requested - why for this release]:

per dan's comment in #3
Tracking for 52.  Timothy I assume you'll request the uplift?
Closed: 6 years ago
Resolution: --- → FIXED
Comment on attachment 8819111 [details] [diff] [review]

Approval Request Comment
[Feature/Bug causing the regression]:

Bug 1112972 rewrote most of the multipart image code. The previous code could have had the same bug though.

[User impact if declined]:

speculative security fix

[Is this code covered by automated tests?]:

not for this specific issue, no

[Has the fix been verified in Nightly?]:

can't really verify it, speculative issue

[Needs manual test from QE? If yes, steps to reproduce]: 


[List of other uplifts needed for the feature/fix]:


[Is the change risky?]:

should be pretty safe

[Why is the change risky/not risky?]:

we will just create an empty image if there is no data for one part of a multipart image

[String changes made/needed]:

Attachment #8819111 - Flags: approval-mozilla-aurora?
Comment on attachment 8819111 [details] [diff] [review]

handle empty parts in multipart images, aurora52+
Attachment #8819111 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Group: gfx-core-security → core-security-release
Flags: qe-verify-
Whiteboard: [post-critsmash-triage]
Whiteboard: [post-critsmash-triage] → [post-critsmash-triage][adv-main52-]
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.