SecurityReason.com - Our Reason is

Security

Register | Forget Password | Login
SecurityReason
WLB
Services
RSS
Corporate
Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Home arrow SecurityAlert Database

Arrow  Topic :

Buffer-overflow and format string in VideoLAN VLC 0.8.6d


Arrow  SecurityAlert : 3550
Arrow  CVE : CVE-2007-6681
Arrow  CVE : CVE-2007-6682
Arrow  SecurityRisk : High  Security Risk High  (About)
Arrow  Remote Exploit : Yes
Arrow  Local Exploit : Yes
Arrow  Exploit Available : Yes
Arrow  Credit : Luigi Auriemma
Arrow  Published : 17.01.2008

Arrow  Affected Software : VideoLAN (VLC) <= 0.8.6d



Arrow  Advisory Content :  

#######################################################################

Luigi Auriemma

Application: VideoLAN (VLC)
http://www.videolan.org
Versions: <= 0.8.6d
Platforms: Windows, Mac, *BSD, *nix and more
Bugs: A] buffer-overflow in the handling of the subtitles
(originally found by Michal Luczaj)
B] format string in the web interface
Exploitation: A] local
B] remote
Date: 24 Dec 2007
Author: Luigi Auriemma
e-mail: aluigi (at) autistici (dot) org [email concealed]
web: aluigi.org

#######################################################################

1) Introduction
2) Bugs
3) The Code
4) Fix

#######################################################################

===============
1) Introduction
===============

VideoLAN (VLC) is one of the most famous and used media players for
various reasons: simple to use, open source, multi platform, many
features available, continuosly updated and more.

#######################################################################

=======
2) Bugs
=======

---------------------------------------------------
A] buffer-overflow in the handling of the subtitles
---------------------------------------------------

VLC is able to handle the subtitles automatically in a very simple way,
it just checks the presence of ssa files with the same name of the
loaded video and a possible subtitles folder.
The functions which handle the MicroDvd, SSA and Vplayer subtitle
formats are vulnerable to some stack based buffer-overflow
vulnerabilities which can allow an attacker to execute malicious code.

from modulesdemuxsubtitle.c:

static int ParseMicroDvd( demux_t *p_demux, subtitle_t *p_subtitle )
...
char buffer_text[MAX_LINE + 1];
...
if( sscanf( s, "{%d}{}%[^rn]", &i_start, buffer_text ) == 2 ||
sscanf( s, "{%d}{%d}%[^rn]", &i_start, &i_stop, buffer_text )
== 3)

static int ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle )
...
char buffer_text[ 10 * MAX_LINE];
char buffer_text2[ 10 * MAX_LINE];
...
if( sscanf( s,
"Dialogue: %[^,],%d:%d:%d.%d,%d:%d:%d.%d,%[^rn]",
buffer_text2,
&h1, &m1, &s1, &c1,
&h2, &m2, &s2, &c2,
buffer_text ) == 10 )

static int ParseVplayer( demux_t *p_demux, subtitle_t *p_subtitle )
...
char buffer_text[MAX_LINE + 1];
...
if( sscanf( p, "%d:%d:%d%[ :]%[^rn]", &h, &m, &s, &c, buffer_text )
== 5 )

As written in the header of this advisory, these buffer-overflow bugs
have been originally found and reported by Michal Luczaj this summer
and the strange thing is that the SVN is fixed from that time BUT the
current 0.8.6d (both executables and source code!) is still vulnerable.
References:

http://mailman.videolan.org/pipermail/vlc-devel/2007-June/032672.html
http://mailman.videolan.org/pipermail/vlc-devel/2007-June/033394.html
http://trac.videolan.org/vlc/browser/trunk/modules/demux/subtitle.c?rev=
20715

-------------------------------------
B] format string in the web interface
-------------------------------------

VLC can be controlled remotely through a nice web interface (a mini
http server) which runs by default on port 8080.
The instructions which handle the Connection parameter sent by the
client pass its content to the httpd_MsgAdd function without the
needed format argument.
In addition the new formatted Connection field is also sent back by the
server in its reply, very useful for the attacker to tune the own
exploit for increasing the percentage of success of the attack.

from networkhttpd.c:

static int httpd_FileCallBack( httpd_callback_sys_t *p_sys, httpd_client_t
*cl, httpd_message_t *answer, httpd_message_t *query )
...
psz_connection = httpd_MsgGet( &cl->query, "Connection" );
if( psz_connection != NULL )
{
httpd_MsgAdd( answer, "Connection", psz_connection );
}

#######################################################################

===========
3) The Code
===========

http://aluigi.org/poc/vlcboffs.zip

A] open vlcbof.avi and the ssa subtitle will be loaded automatically

B] nc SERVER 8080 -v -v < vlcfs.txt

#######################################################################

======
4) Fix
======

Current SVN is fixed.
The nightly builds are available here:

http://nightlies.videolan.org

#######################################################################

---
Luigi Auriemma
http://aluigi.org






Arrow  Feedback :

If you have additional information or notice any errors regarding this security advisory, please use contact form or email us at info()securityreason()com.
Alert

libc:fts_*() Multiple Denial of Service

Security Risk Medium- 2009-10-02

The fts functions are provided for traversing UNIX file hierarchies...

Apache RSS Apache Alert

» Apache 1.3.41 mod_proxy
   Integer overflow (code
   execution)

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion in work
   directory

» Apache Tomcat 6.0.20 and
   5.5.28 insecure partial
   deploy after failed
   undeploy

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion and/or
   alteration

PHP RSS PHP Alert

» PHP 5.2.12/5.3.1
   session.save_path
   safe_mode and
   open_basedir bypass

» PHP 5.2.12/5.3.1 Multiple
   Vulnerabilities

» PHP 5.2.11 libgd multiple
   vulnerabilities

» PHP 5.2.11 tempnam()
   safe_mode bypass

Copyright © SecurityReason.com. All Rights Reserved.