Closed
Bug 1368276
Opened 9 years ago
Closed 9 years ago
Potential integer overflow in BootAnimation.cpp with large PNG image
Categories
(Firefox OS Graveyard :: General, enhancement)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: glennrp+bmo, Assigned: glennrp+bmo)
Details
Attachments
(1 file, 1 obsolete file)
|
1.14 KB,
patch
|
Details | Diff | Splinter Review |
CVE-2016-5735 describes a potential integer overflow in pngquant, when it attempts to allocate a buffer for the entire image. The PNG format limits width and height to 2^31-1, and the number of bytes per pixel can be as large as 8. The product of width*height*bytespp can exceed 2^64, leading to integer overflow, even on 64-bit platforms. While the CVE was about a particular libpng applicaton, all libpng applications that attempt to allocate an image buffer are susceptible to this vulnerability, which is disclosed in the pngquant patch and in the forthcoming libpng-1.6.30 release. Our BootAnimation.cpp suffers from this potential overflow. We should apply the same fix to BootAnimation.cpp as used in pngquant and in the libpng distribution.
| Assignee | ||
Comment 1•9 years ago
|
||
Assignee: nobody → glennrp+bmo
| Assignee | ||
Comment 2•9 years ago
|
||
| Assignee | ||
Comment 3•9 years ago
|
||
Removed "return" statement that cannot be reached after png_error().
Attachment #8872090 -
Attachment is obsolete: true
| Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 4•9 years ago
|
||
Observe that the recommended check is equivalent to what we already do in image/decoders/nsPNGDecoder.cpp at line 780.
Comment 6•9 years ago
|
||
There's no point in running this through Try. FxOS is dead and we don't even have CI for it anymore. I'm inclined to WONTFIX this and open it up - what are your thoughts, Paul?
Flags: needinfo?(ryanvm) → needinfo?(ptheriault)
Comment 7•9 years ago
|
||
Opened up once affected Firefox branches are updated with the new libpng version, of course.
| Assignee | ||
Comment 8•9 years ago
|
||
There's no dependence upon libpng versions.
| Assignee | ||
Comment 9•9 years ago
|
||
I'm fine with WONTFIX, given comment #6
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Yep, I think that's appropriate. I'm not sure what timeframe comment 7 is referring to, so I'll leave this closed for now.
Flags: needinfo?(ptheriault)
| Assignee | ||
Comment 11•9 years ago
|
||
comment #7 is, I suppose, referring to libpng-1.6.30 which has fixes for this vulnerability in several applications distributed with libpng but nothing in libpng proper, because libpng itself is not vulnerable. I don't know when libpng-1.6.30 will be out because there are no pressing reasons for a quick release.
Comment 12•9 years ago
|
||
Yeah, I just don't want to see us accidentally 0-day others by making this bug public too early. Let us know when we're good to do so :)
| Assignee | ||
Comment 13•9 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM] from comment #12)
> Yeah, I just don't want to see us accidentally 0-day others by making this
> bug public too early. Let us know when we're good to do so :)
The vulnerability was publicly exposed in the pnqquant git repository nearly a year ago, and in the
libpng-1.6.30beta series, the libpng mailing list, and CVE-2016-5735 recently. If you'd rather wait
until libpng-1.6.30 is released, OK, but I do not see a need for that.
Updated•8 years ago
|
Group: b2g-core-security
You need to log in
before you can comment on or make changes to this bug.
Description
•