VLC Media Player Memory Corruption

December 30, 2009

VideoLAN VLC Media Player is an open source multimedia player. It can play various audio/video formats (MPEG, DivX, ogg, Wave etc.) as well as streaming protocols. It is highly portable and available for multiple platforms.

VLC Media Player can be instructed to open media resources referred by URIs. A URI can be supplied to VLC Media Player by embedding it in a playlist file, such as a M3U or XSPF (XML Shareable Playlist Format) file. A URI can also be supplied by sending an HTTP request to the VLC Media Player web interface. In a URI, a "smb" scheme (often appears as "smb://path") addresses a file on SMB share. The generic form of the SMB URI parsed by VLC media player is as follows:


A memory corruption vulnerability exists in VLC Media Player for Windows. Specifically, the vulnerability is due to an invalid free error when processing specific SMB URIs. If an invalid username is specified in the SMB URI, the vulnerable code will call the Kernel32.FreeLibrary function. The function call will fail however the vulnerable code does not check the result. The vulnerable code then copies a 4-byte string from the stack at a fixed offset and uses that value as a memory pointer.

An attacker can exploit this vulnerability by enticing a user to open a crafted playlist file. Successful exploitation would allow for arbitrary code injection and execution with the privileges of the currently logged in user. Code injection that does not result in execution would terminate the application due to memory corruption.

SonicWALL has released 2 IPS signatures to detect and block specific exploitation attempts targeting this vulnerability. The signatures are listed below:

  • 1337 VideoLAN VLC Media Player smb URI Handling Memory Corruption Attempt
  • 4533 VideoLAN VLC Media Player smb URI Handling Memory Corruption PoC