Closed
Bug 468270
Opened 17 years ago
Closed 17 years ago
cairo UMR can lead to information leak via canvas' drawImage
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: Gavin, Assigned: vlad)
Details
(Whiteboard: [sg:moderate] 1.8 branch only)
Attachments
(3 files)
Reported by j00ru.vx@gmail.com to security@mozilla.org.
The similar bug he refers to is bug 408076.
I've only been able to reproduce on Windows, and only in 2.0.0.x (Mac and Windows, 3.0.x/2.0.0.x/trunk).
========
Hello,
I believe I have recently found a minor security flaw in one of your products - Firefox 2.x, to be exact.
As far as I know, this version of the web browser is affected by a bug that causes a heap-based information leak
to occur while rendering some malformed .BMP graphical files. The vulnerability concerns the RLE8-decoding function.
When the application tries to correctly decompress the real contents of an image, it does not check the uncompressed
data size - in case there isn't any data (or there is one byte of decompressed data VS 4095 pixels of the image)
to be put in the image pixel buffer, it stays unfilled (since it's a part of the heap - it isn't cleaned in any way, either)
till the renderer draws the old memory contents on the screen. Yet there's no junk-memory displayed if one of
End-Of-Line / End-Of-File markers are put at the end of compressed image data.
More detailed RLE8 compression/decompression article can be found at:
http://msdn.microsoft.com/en-us/library/ms532328(VS.85).aspx
The bug is similar to the one found by Gynvael Coldwind, in a sense (http://www.hispasec.com/laboratorio/vulnerabilidad_firefox_en.pdf).
The proof of concept files are enclosed to this message in a ZIP archive (they don't differ much from these provided by Gynvael).
I want to coordinate the disclosure. Opera and Apple vendors are also affected.
Please give me a sign with your opinion about this issue.
Best regards,
Matthew 'j00ru' Jurczyk // Hispasec Sistemas
Flags: blocking1.8.1.next?
| Reporter | ||
Comment 1•17 years ago
|
||
| Reporter | ||
Updated•17 years ago
|
Attachment #351714 -
Attachment mime type: application/octet-stream → image/bmp
| Reporter | ||
Comment 2•17 years ago
|
||
Slightly modified to run straight from BMO, uses attachment 351714 [details].
| Reporter | ||
Comment 3•17 years ago
|
||
| Reporter | ||
Updated•17 years ago
|
Whiteboard: [sg:moderate]
| Reporter | ||
Comment 4•17 years ago
|
||
This doesn't appear to be caused by a problem by the BMP/ICO decoder itself, despite the reporter's comments. The data for the given image is the consistent between multiple loads even though the testcase does give random results (verified by comparing data passed to gfxImageFrame::SetImageData/SetAlphaData). Loading the image directly also seems to work OK, which makes me suspect the UMR is somewhere in canvas or cairo code instead.
| Reporter | ||
Comment 5•17 years ago
|
||
This was fixed on trunk by either bug 343655 or bug 342366 (the former appears to be much more likely). That also explains why this is Windows only.
Component: ImageLib → GFX: Thebes
QA Contact: imagelib → thebes
| Reporter | ||
Updated•17 years ago
|
Summary: BMP file handling information leak → canvas drawImage UMR can lead to information leak
Whiteboard: [sg:moderate] → [sg:moderate] 1.8 branch only
| Reporter | ||
Comment 6•17 years ago
|
||
http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&branch=HEAD&branchtype=match&date=explicit&mindate=2006-08-09+02%3A00&maxdate=2006-08-10+05%3A00 is the regression range I found that led to comment 5.
Updated•17 years ago
|
Assignee: nobody → joe
Flags: wanted1.8.1.x+
Flags: blocking1.8.1.next?
Flags: blocking1.8.1.next+
| Reporter | ||
Updated•17 years ago
|
Summary: canvas drawImage UMR can lead to information leak → cairo UMR can lead to information leak via canvas' drawImage
| Assignee | ||
Comment 7•17 years ago
|
||
Hm, this slipped through the cracks for me -- is a patch for this still needed?
Assignee: joe → vladimir
Comment 8•17 years ago
|
||
(In reply to comment #7)
> Hm, this slipped through the cracks for me -- is a patch for this still needed?
Yes.
Updated•17 years ago
|
Flags: blocking1.8.1.next+
Comment 9•17 years ago
|
||
This is not needed for Thunderbird 2, and the patches in the bugs mentioned in comment 5 can't easily be landed on that branch (assume a massive graphics backend rewrite). We're unfortunately going to have to WONTFIX this. For the people left on the old versions this minor information leak is the least of their worries going forward.
Unless the linux distro folks can roust the programmer resources to tackle this. Asac, want to leave this open?
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Updated•16 years ago
|
Group: core-security
You need to log in
before you can comment on or make changes to this bug.
Description
•