Bug 233705

Summary: CVE-2007-0653 XMMS multiple issues (CVE-2007-0654)
Product: [Fedora] Fedora Reporter: Ville Skyttä <ville.skytta>
Component: xmmsAssignee: Paul F. Johnson <paul>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: 6CC: fedora-security-list, shigorin, triage
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=low,reported=20070206,source=secunia,embargo=20070321 bzcl34nup
Fixed In Version: 1.2.10-35 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-04 08:26:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 228013    
Attachments:
Description Flags
extracted from ubuntu cumulative diff none

Description Ville Skyttä 2007-03-23 21:24:33 UTC
Cloning RHEL bug for FE[56].


+++ This bug was initially created as a clone of Bug #228013 +++

Sven Krewitt of Secunia reported two flaws he discovered in the way XMMS handles
skin files.  Here are the technical details provided by Sven:

--- Details ---

CVE-2007-0654
1) An integer underflow error exists when loading skin bitmap images,
which can be exploited to cause a stack-based buffer overflow via
specially crafted skin images containing manipulated header information.

The vulnerability is caused due to errors within "read_bmp()" in
xmms/bmp.c when loading skin bitmap images.

-- xmms/bmp.c --
GdkPixmap *read_bmp(gchar * filename)
[...]
fseek(file, 8, SEEK_CUR);
read_le_long(file, &offset); <-- [1]
read_le_long(file, &headSize);
[...]
else if (bitcount != 24 && bitcount != 16 && bitcount != 32)
{
gint ncols, i;

ncols = offset - headSize - 14; <-- [2]
if (headSize == 12)
{
ncols = MIN(ncols / 3, 256);
for (i = 0; i < ncols; i++)
fread(&rgb_quads[i], 3, 1, file);
}
else
{
ncols = MIN(ncols / 4, 256);
fread(rgb_quads, 4, ncols, file); <-- [3]
[...]
-----

"offset" [1] is not properly verified before being used to calculate
"ncols" [2]. "bitcount" has to be set to a different value than 24, 16
or 32 (but can also be user controlled).
This can be exploited to cause a integer underflow,
resulting in a stack based buffer overflow, which can be used to
overwrite the return address of "read_bmp()" [3].

Successful exploitation allows execution of arbitrary code.


CVE-2007-0653
2) An integer overflow error exists when loading skin bitmap images.
This can be exploited to cause a memory corruption via specially crafted
skin images containing manipulated header information.

-- xmms/bmp.c --
GdkPixmap *read_bmp(gchar * filename)
[...]
else if (headSize == 40) /* BITMAPINFO */
{
guint16 tmp;

read_le_long(file, &w); <-- [4]
read_le_long(file, &h); <-- [4]
[...]
fseek(file, offset, SEEK_SET);
buffer = g_malloc(imgsize);
fread(buffer, imgsize, 1, file);
fclose(file);
data = g_malloc0((w * 3 * h) + 3); <-- [5]

if (bitcount == 1)
----

-- Additional comment from bressers on 2007-02-09 10:23 EST --
These flaws also affect RHEL2.1 and RHEL3

-- Additional comment from davidz on 2007-02-09 12:32 EST --
Are there patches for these yet?

-- Additional comment from bressers on 2007-02-09 13:19 EST --
There are no patches yet.  I'm still trying to contact someone upstream about
this.  If you have any upstream contacts, please let me know.

-- Additional comment from bressers on 2007-03-21 09:26 EST --
Lifting embargo

Comment 1 Michael Shigorin 2007-03-25 19:34:18 UTC
havard@xmms I guess, but that way can take quite some time I'm afraid...

Comment 2 Michael Shigorin 2007-03-28 18:06:37 UTC
Created attachment 151140 [details]
extracted from ubuntu cumulative diff

http://www.ubuntu.com/usn/usn-445-1

Comment 3 Paul F. Johnson 2007-04-01 11:19:04 UTC
Imported in rawhide - will wait to see if it helps for a week and import into
core 08/04/07

Comment 4 Bug Zapper 2008-04-04 06:39:02 UTC
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.
http://fedoraproject.org/wiki/LifeCycle/EOL

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers

Comment 5 Tomas Hoger 2008-04-04 08:26:35 UTC
Fixed in all current Fedora version as of version 1:1.2.10-35.