AOH :: HP Unsorted V :: VA1610.HTM

VLC media player TiVo ty Processing Stack Overflow Vulnerability
VLC media player TiVo ty Processing Stack Overflow Vulnerability
VLC media player TiVo ty Processing Stack Overflow Vulnerability

This is a multi-part message in MIME format.
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Please find attached a detailed advisory of the vulnerability.

Alternatively, the advisory can also be found at: 

Content-Type: text/plain;
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;

Hash: SHA1

Advisory:               VLC media player TiVo ty Processing Stack Overflow 
Advisory ID:            TKADV2008-010
Revision:               1.0              
Release Date:           2008/10/20 
Last Modified:          2008/10/20 
Date Reported:          2008/10/18
Author:                 Tobias Klein (tk at
Affected Software:      VLC media player <= 0.9.4
Remotely Exploitable:   Yes
Locally Exploitable:    No 
Vendor URL: 
Vendor Status:          Vendor has released an updated version       
Patch development time: 1 day

=====================Vulnerability details: 
The VLC media player contains a stack overflow vulnerability while parsing
malformed TiVo ty media files. The vulnerability can be trivially exploited
by a (remote) attacker to execute arbitrary code in the context of VLC 
media player.

=================Technical Details:
Source code file: modules\demux\Ty.c

1623	static void parse_master(demux_t *p_demux)
1624	{
1625	  demux_sys_t *p_sys = p_demux->p_sys;
1626	  uint8_t mst_buf[32];  <-- [1]
1627	  int i, i_map_size;
1628	  int64_t i_save_pos = stream_Tell(p_demux->s);
1629	  int64_t i_pts_secs;
1631	  /* Note that the entries in the SEQ table in the stream may have
1632	     different sizes depending on the bits per entry.  We store them
1633	     all in the same size structure, so we have to parse them out one
1634	     by one.  If we had a dynamic structure, we could simply read the
1635	     entire table directly from the stream into memory in place. */
1637	  /* clear the SEQ table */
1638	  free(p_sys->seq_table);
1640	  /* parse header info */
1641	  stream_Read(p_demux->s, mst_buf, 32);  <-- [2]
1642	  i_map_size = U32_AT(&mst_buf[20]);  <-- [3]
1643	  p_sys->i_bits_per_seq_entry = i_map_size * 8;
1644	  i = U32_AT(&mst_buf[28]);   /* size of SEQ table, in bytes */
1645	  p_sys->i_seq_table_size = i / (8 + i_map_size);
1647	  /* parse all the entries */
1648	  p_sys->seq_table = malloc(p_sys->i_seq_table_size * 
1649	  for (i=0; ii_seq_table_size; i++) {
1650	      stream_Read(p_demux->s, mst_buf, 8 + i_map_size);  <-- [4]

[1] This stack buffer can be overflowed
[2] 32 bytes of user controlled file data are copied into "mst_buf"
[3] "i_map_size" is extracted from the user controlled file data 
[4] The user controlled value of "i_map_size" is used as a length value 
    for the "stream_Read()" function. This function copies "i_map_size" 
    bytes of file data (that can also be controlled by the attacker) into 
    the stack buffer "mst_buf". This leads to a straight stack overflow 
    that can be trivially exploited by a (remote) attacker to execute 
    arbitrary code in the context of VLC.

  See "Workarounds" and "Solution" sections of the VideoLAN-SA-0809 [1].

  2008/10/18 - Vendor notified
  2008/10/18 - Patch developed 
  2008/10/20 - Public disclosure of vulnerability details by the vendor
  2008/10/20 - Release date of this security advisory

  Vulnerability found and advisory written by Tobias Klein.


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

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: 

Copyright 2008 Tobias Klein. All rights reserved.

Version: GnuPG 



The entire AOH site is optimized to look best in Firefox® 3 on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2015 AOH
We do not send spam. If you have received spam bearing an email address, please forward it with full headers to