<<< Date Index >>>     <<< Thread Index >>>

Mozilla XBM Image Vulnerability




Package:            Mozilla
Auth:               http://www.mozilla.org
Vulnerability Type: Remote Denial Of Service
Affected Software:  Mozilla ver. 1.6 for Windows 
                    (maybe vulnerable also prior versions)
Not vulnerable:     Mozilla for Linux





What's Mozilla:
--------------

Mozilla is a suite of internet applications.
Users can choose which components meet their needs from
Web-browser, E-mail and Newsgroup client, IRC chat client, 
and HTML editing.





Vulnerability Description:
-------------------------

Mail client and Web Browser allows the usage of XBM graphic
files and a security flaw in the way softwares handles those
images, allow a malicious user to perform a denial-of-service 
attack. The X BitMap data is stored as ASCII data, and 
files begin with '#define' statements in substitution 
of a header.  
Following is an example of a 16x16 XBM bitmap, 
named Esempio.xbm:



#define Esempio_width 16
#define Esempio_height 16

static unsigned short Esempio_bits[] = {
    0x0000, 0x35ca, 0x3c40, 0x0000, 0x7810, 0x0000, 0xe009, 0x0000,
    0xc007, 0x05ba, 0x4ff6, 0x201e, 0xa08e, 0x0d3c, 0x02ad,
    0x35ca};



Opening file, Mozilla read width and height values from '#define' 
statement and try to allocate enought memory to display image. 
Defining high values to width and height parameters would 
cause the application to crash.
This vulnerability can be exploited by sending an e-mail containing 
a specially crafted image, or tricking a user on a malicious website.





Proof of Concept:
----------------

A proof of concept is aviable at this address:

http://www.geocities.com/xbm_bug/index.html









Credits:

-- 
Luca Ercoli     <luca.ercoli [at] inwind.it>