Bug 442882 - (CVE-2008-1878) CVE-2008-1878 xine-lib: buffer overflow in nsf demuxer (CVE-2008-1964)
CVE-2008-1878 xine-lib: buffer overflow in nsf demuxer (CVE-2008-1964)
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
source=gentoo,reported=20080417,publi...
: Security
Depends On: 443054 443055 443056 443969
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-17 07:55 EDT by Tomas Hoger
Modified: 2008-06-19 08:56 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-19 08:56:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Reporter's PoC (128 bytes, audio/mpeg)
2008-04-17 07:55 EDT, Tomas Hoger
no flags Details

  None (edit)
Description Tomas Hoger 2008-04-17 07:55:26 EDT
Guido Landi reported following xine-lib issue to Full-Disclosure mailing list:

xine-lib <= 1.1.12 is prone to a stack-based buffer overflow in the NES 
Sound Format demuxer(demux_nsf.c).

- Code

open_nsf_file():

109: this->title = strdup(&header[0x0E]);

demux_nsf_send_chunk():

122: char title[100];
162: sprintf(title, "%s, song %d/%d",
            this->title, this->current_song, this->total_songs);


- Affected applications

http://xinehq.de/index.php/releases


- PoC

perl -e 'print "\x4E\x45\x53\x4D\x1A\x01\x01\x01\x80\x80\x18\x8A\x03\x8A" .
"\x41" x 114' > evil.mp3


Reference:
http://marc.info/?l=full-disclosure&m=120839374812553&w=4

Does not seem to be fixed upstream yet.  Overflow is caught by stack protector.
Comment 1 Tomas Hoger 2008-04-17 07:55:26 EDT
Created attachment 302736 [details]
Reporter's PoC
Comment 2 Tomas Hoger 2008-04-17 10:14:37 EDT
Exploit is now also on milw0rm:

http://milw0rm.com/exploits/5458
Comment 5 Fedora Update System 2008-04-24 10:08:57 EDT
xine-lib-1.1.11.1-1.fc7.2 has been submitted as an update for Fedora 7
Comment 6 Fedora Update System 2008-04-24 11:40:16 EDT
xine-lib-1.1.12-2.fc8 has been submitted as an update for Fedora 8
Comment 7 Tomas Hoger 2008-04-28 04:15:46 EDT
Another issue was reported as affecting nsf demuxer, however, it was disputed as
invalid shortly.  CVE id CVE-2008-1964 was assigned anyway:

CVE-2008-1964

** DISPUTED **

Stack-based buffer overflow in the demux_nsf_send_headers function in
src/demuxers/demux_nsf.c in xine-lib allows remote attackers to have
an unknown impact via a long copyright field in an NSF header in an
NES Sound file, a different issue than CVE-2008-1878.  NOTE: a third
party claims that the copyright field always has a safe length.

References:
http://www.securityfocus.com/archive/1/archive/1/491274/100/0/threaded
http://www.securityfocus.com/archive/1/archive/1/491248/100/0/threaded
http://www.securityfocus.com/bid/28908


xine-lib-1.1.12-CVE-2008-1878.patch applied to Fedora packages adds more
explicit limits on copyright field length.
Comment 8 Fedora Update System 2008-04-29 16:52:02 EDT
xine-lib-1.1.11.1-1.fc7.2 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2008-04-29 16:55:31 EDT
xine-lib-1.1.12-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Red Hat Product Security 2008-06-19 08:56:30 EDT
This issue was addressed in:

Fedora:
  https://admin.fedoraproject.org/updates/F7/FEDORA-2008-3326
  https://admin.fedoraproject.org/updates/F8/FEDORA-2008-3353


Note You need to log in before you can comment on or make changes to this bug.