what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

MPlayer TwinVQ Processing Stack Buffer Overflow

MPlayer TwinVQ Processing Stack Buffer Overflow
Posted Dec 15, 2008
Authored by Tobias Klein | Site trapkit.de

MPlayer contains a stack buffer overflow vulnerability while parsing malformed TwinVQ media files. The vulnerability may be exploited by a (remote) attacker to execute arbitrary code in the context of MPlayer. Versions 1.0rc2 below r28150 and SVN trunk below r28149 are affected.

tags | advisory, remote, overflow, arbitrary
SHA-256 | 3d02003114810b5a72337c7ed271ed1847f5dd7313989408e20fa407cb420c3c

MPlayer TwinVQ Processing Stack Buffer Overflow

Change Mirror Download
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Advisory: MPlayer TwinVQ Processing Stack Buffer Overflow
Vulnerability
Advisory ID: TKADV2008-014
Revision: 1.0
Release Date: 2008/12/14
Last Modified: 2008/12/14
Date Reported: 2008/12/07
Author: Tobias Klein (tk at trapkit.de)
Affected Software: MPlayer 1.0rc2 < r28150 and
MPlayer SVN trunk < r28149
Remotely Exploitable: Yes
Locally Exploitable: No
Vendor URL: http://www.mplayerhq.hu
Vendor Status: Vendor has released an updated version
Patch development time: 8 days


======================
Vulnerability Details:
======================

MPlayer contains a stack buffer overflow vulnerability while parsing
malformed TwinVQ media files. The vulnerability may be exploited by a
(remote) attacker to execute arbitrary code in the context of MPlayer.


==================
Technical Details:
==================

Source code file: libmpdemux\demux_vqf.c

[...]
24 static demuxer_t* demux_open_vqf(demuxer_t* demuxer) {
...
49 char chunk_id[4];
50 unsigned chunk_size;
51 [1] hi->size=chunk_size=stream_read_dword(s); /* include itself */
52 stream_read(s,chunk_id,4);
53 if(*((uint32_t *)&chunk_id[0])==mmioFOURCC('C','O','M','M'))
54 {
55 [2] char buf[chunk_size-8];
56 unsigned i,subchunk_size;
57 [3] if(stream_read(s,buf,chunk_size-8)!=chunk_size-8) return NULL;
...
86 i+=subchunk_size+4;
87 while(i<chunk_size-8)
88 {
89 unsigned slen,sid;
90 [4] char sdata[chunk_size];
91 sid=*((uint32_t *)&buf[i]); i+=4;
92 [5] slen=be2me_32(*((uint32_t *)&buf[i])); i+=4;
93 if(sid==mmioFOURCC('D','S','I','Z'))
94 {
95 hi->Dsiz=be2me_32(*((uint32_t *)&buf[i]));
96 continue; /* describes the same info as size of DATA chunk */
97 }
98 [6] memcpy(sdata,&buf[i],slen); sdata[slen]=0; i+=slen;
[...]

[1] The unsigned int variable "chunk_size" is filled with a user controlled
value from the media file.
[2] The value of "chunk_size" is used to calculate the length of the stack
buffer "buf".
[3] "buf" is filled with user controlled data from the media file.
[4] The value of "chunk_size" is again used as a length specifier for
another stack buffer called "sdata".
[5] The unsigned int variable "slen" is filled with a user controlled value
from the media file.
[6] This memcpy() function copies "slen" bytes of user controlled data from
"buf" into the stack buffer "sdata". As "slen", the source data as well
as the size of the destination buffer "sdata" are user controlled this
leads to an exploitable stack buffer overflow vulnerability.


=========
Solution:
=========

Upgrade to MPlayer 1.0rc2 >= r28150 (see [1]) or MPlayer SVN trunk
>= r28149 (see [2]).


========
History:
========

2008/12/07 - MPlayer maintainers notified (no response)
2008/12/13 - MPlayer maintainers notified a 2nd time
2008/12/13 - Patch developed by MPlayer maintainers
2008/12/14 - Public disclosure of vulnerability details by MPlayer
maintainers
2008/12/14 - Release date of this security advisory


========
Credits:
========

Vulnerability found and advisory written by Tobias Klein.


===========
References:
===========

[1] http://svn.mplayerhq.hu/mplayer?view=rev&revision=28150
[2] http://svn.mplayerhq.hu/mplayer?view=rev&revision=28149
[3] http://www.trapkit.de/advisories/TKADV2008-014.txt


========
Changes:
========

Revision 0.1 - Initial draft release to the vendor
Revision 1.0 - Public release


===========
Disclaimer:
===========

The information within this advisory may change without notice. Use
of this information constitutes acceptance for use in an AS IS
condition. There are no warranties, implied or express, with regard
to this information. In no event shall the author be liable for any
direct or indirect damages whatsoever arising out of or in connection
with the use or spread of this information. Any use of this
information is at the user's own risk.


==================
PGP Signature Key:
==================

http://www.trapkit.de/advisories/tk-advisories-signature-key.asc


Copyright 2008 Tobias Klein. All rights reserved.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG

iD8DBQFJRTPgkXxgcAIbhEERAozRAJ99w8+Fd/tpkrFK6iWULTNsrUFPCQCgscV3
bq82SPZiJ7lWooDSZUW7en4=
=6hrU
-----END PGP SIGNATURE-----
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    16 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close