close

This ticket was migrated to our GitLab and can now be found here: #13390

Opened 6 years ago

Closed 6 years ago

#13390 closed defect (notvlc)

VLC Player 2.1.5 Write Access Violation Vulnerability

Reported by: Veysel Owned by:
Priority: high Milestone: 2.2.0
Component: Unknown Version: master git
Severity: major Keywords:
Cc: vhatas@…, cehoyos, michaelni Difficulty: unknown
Platform(s): Windows desktop Work status: Not started

Description

Title : VLC Player 2.1.5 Write Access Violation Vulnerability Discoverer: Veysel HATAS (vhatas@…) Web page : www.binarysniper.net Test: Windows XP SP3 Status: Not Fixed Severity : High

Discovered: 24 November 2014

Description : VLC Player contains a flaw that is triggered as user-supplied input is not properly sanitized when handling a specially crafted m2v file. This may allow a context-dependent attacker to corrupt memory and cause a denial of service or potentially execute arbitrary code.

attachment 1: windbglog.txt

Attachments (4)

windbglog.txt (15.2 KB) - added by Veysel 6 years ago.
vlc-2.1.5-dump-trac13390.TXT (20.9 KB) - added by gregory gascon 6 years ago.
WinDBG dump on Windows 7 x64 VLC 2.1.5
vlc-2.1.5-13390.dmp (119.0 KB) - added by gregory gascon 6 years ago.
WinDBG minidump - Write Access Violation
windbg.TXT (16.4 KB) - added by Veysel 6 years ago.
windbgxpsp3.TXT

Download all attachments as: .zip

Change History (34)

Changed 6 years ago by Veysel

Attachment: windbglog.txt added

comment:1 Changed 6 years ago by cehoyos

Cc: cehoyos added

Where can I find the media file that causes the crash?

comment:2 Changed 6 years ago by Veysel

comment:4 Changed 6 years ago by Veysel

Uploaded..

comment:6 Changed 6 years ago by Veysel

MITRE reserves CVE-ID (CVE-2014-9598) for the above vulnerability.

Last edited 6 years ago by Veysel (previous) (diff)

comment:7 Changed 6 years ago by Jean-Baptiste Kempf

It is still doubtful that this is VLC vulnerability, and not libav one.

comment:8 Changed 6 years ago by Jean-Baptiste Kempf

Resolution: notvlc
Status: newclosed

So, this is NOT a VLC bug, but a libavcodec one.

Assigning a CVE to VLC is just wrong.

Moreover, the 2.2.0-rc2 binaries already fix the problem.

comment:9 Changed 6 years ago by Jean-Baptiste Kempf

Oh, btw, 2.1.5 Windows does not even crash on this sample.

comment:10 Changed 6 years ago by michaelni

Cc: michaelni added

comment:11 Changed 6 years ago by michaelni

I Tested the samples for ticket 13389 and 13390 under valgrind + FFmpeg with libavcodec from all FFmpeg release branches, from 0.5 to 2.5. None showed a crash or relevant issue. Testing vlc 2.1.5 i was able to reproduce a assertion failue vlc: misc/picture_pool.c:195: picture_pool_Delete: Assertion `vlc_atomic_get(&picture->gc.refcount) == 0' failed. vlc 2.2.0-pre1 did not show any failure, in no case could i reproduce a crash. Looking into what causes the assertion failure, it appears that vlc calls ThreadReinit() -> ThreadStop() -> vout_EndWrapper() -> picture_pool_Delete() which then fails with one of the picture->gc.refcount being 1. At the same time there still is a buffer in use by libavcodec and the codec has not been closed, that is avcodec_close() is never called Iam not a vlc developer and thus do not really know the vlc code but this looks more like an issue in vlc than libavcodec. Note that of course i do not know if the assertion failure and the reported crash are related. But that was everything i could find after searching for several hours. If someone belives there is an issue in libavcodec, then i do need more information/details about where the issue is.

comment:12 in reply to:  11 ; Changed 6 years ago by Jean-Baptiste Kempf

Replying to michaelni:

I Tested the samples for ticket 13389 and 13390 under valgrind + FFmpeg with libavcodec from all FFmpeg release branches, from 0.5 to 2.5. None showed a crash or relevant issue. Testing vlc 2.1.5 i was able to reproduce a assertion failue vlc: misc/picture_pool.c:195: picture_pool_Delete: Assertion `vlc_atomic_get(&picture->gc.refcount) == 0' failed.

Assert is the right thing to do, and is therefore not exploitable.

comment:13 in reply to:  12 ; Changed 6 years ago by Veysel

Replying to jb:

Replying to michaelni:

I Tested the samples for ticket 13389 and 13390 under valgrind + FFmpeg with libavcodec from all FFmpeg release branches, from 0.5 to 2.5. None showed a crash or relevant issue. Testing vlc 2.1.5 i was able to reproduce a assertion failue vlc: misc/picture_pool.c:195: picture_pool_Delete: Assertion `vlc_atomic_get(&picture->gc.refcount) == 0' failed.

Assert is the right thing to do, and is therefore not exploitable.

How do you conclude that it is not exploitable?

As Michaelni says that there was an unclosed buffer in use when the crash happened. Also as it can be seen in the crash logs (https://trac.videolan.org/vlc/attachment/ticket/13390/windbglog.txt), it seems that crash is write access violation and not near null.

I can provide a demo video about the crash and logs. Can you provide any technical info regarding that it is not exploitable?

comment:14 in reply to:  13 ; Changed 6 years ago by Jean-Baptiste Kempf

Replying to Veysel:

Replying to jb:

Replying to michaelni:

I Tested the samples for ticket 13389 and 13390 under valgrind + FFmpeg with libavcodec from all FFmpeg release branches, from 0.5 to 2.5. None showed a crash or relevant issue. Testing vlc 2.1.5 i was able to reproduce a assertion failue vlc: misc/picture_pool.c:195: picture_pool_Delete: Assertion `vlc_atomic_get(&picture->gc.refcount) == 0' failed.

Assert is the right thing to do, and is therefore not exploitable.

How do you conclude that it is not exploitable?

Because an assert stops the execution of the program.

Can you provide any technical info regarding that it is not exploitable?

Can you give the technical info that it is?

Why do you refuse to:

  • report security issues in the correct way (aka not a public tracker)
  • answer the emails we've sent you
  • provide a full exploitable backtrace
  • test the latest nightly builds and release candidates, as asked
  • assign the CVE to the correct library (if any)
  • give a way to reproduce your claim

Not to mention sending to seclists or to press.

And yes, so far, noone was able to reproduce your crash or claim.

comment:15 in reply to:  14 ; Changed 6 years ago by Veysel

Replying to jb:

Replying to Veysel:

Replying to jb:

Replying to michaelni:

I Tested the samples for ticket 13389 and 13390 under valgrind + FFmpeg with libavcodec from all FFmpeg release branches, from 0.5 to 2.5. None showed a crash or relevant issue. Testing vlc 2.1.5 i was able to reproduce a assertion failue vlc: misc/picture_pool.c:195: picture_pool_Delete: Assertion `vlc_atomic_get(&picture->gc.refcount) == 0' failed.

Assert is the right thing to do, and is therefore not exploitable.

How do you conclude that it is not exploitable?

Because an assert stops the execution of the program.

From security point of view, stopping the execution doesn't mean it can not be exploitable.

Can you provide any technical info regarding that it is not exploitable?

Can you give the technical info that it is?

Popular !exploitable script executed inside windbg clearly shows that it is highly probable.

Why do you refuse to:

  • report security issues in the correct way (aka not a public tracker)
  • answer the emails we've sent you
  • provide a full exploitable backtrace
  • test the latest nightly builds and release candidates, as asked
  • assign the CVE to the correct library (if any)
  • give a way to reproduce your claim

I was kind enough to publish the security issue here about one month ago, but got no decent response till it gets public attention. Btw, I didn't get any email from you. Also, in your bug reporting policy I don't see any other place or person to submit a bug report. (https://wiki.videolan.org/Report_bugs)

Not to mention sending to seclists or to press.

I chose to disclose the it because no further comment has been made from your side. Press got it from there, not from me.

And yes, so far, noone was able to reproduce your crash or claim.

Michealni was able to reproduce the failure in vlc 2.1.5, isn't it obvious in his post?

First you were saying it is not a VLC bug but you have come to a point where you accept that it is VLC but not exploitable.

comment:16 in reply to:  15 Changed 6 years ago by Jean-Baptiste Kempf

Replying to Veysel:

Because an assert stops the execution of the program.

From security point of view, stopping the execution doesn't mean it can not be exploitable.

I think you fail to understand what assert is. It aborts the program directly, so cannot go to the next step.

Can you give the technical info that it is?

Popular !exploitable script executed inside windbg clearly shows that it is highly probable.

Probable does not mean exploitable.

Why do you refuse to:

  • report security issues in the correct way (aka not a public tracker)
  • answer the emails we've sent you
  • provide a full exploitable backtrace
  • test the latest nightly builds and release candidates, as asked
  • assign the CVE to the correct library (if any)
  • give a way to reproduce your claim

I was kind enough to publish the security issue here about one month ago, but got no decent response till it gets public attention. Btw, I didn't get any email from you. Also, in your bug reporting policy I don't see any other place or person to submit a bug report. (https://wiki.videolan.org/Report_bugs)

Every other security researcher reports it privately, except you.

Not to mention sending to seclists or to press.

I chose to disclose the it because no further comment has been made from your side. Press got it from there, not from me.

Without exploit. Without reproducibility.

And yes, so far, noone was able to reproduce your crash or claim.

Michealni was able to reproduce the failure in vlc 2.1.5, isn't it obvious in his post?

No, he claims he can get an assert, which is an abort, and is CLEARLY not the backtrace you potentially shown.

First you were saying it is not a VLC bug but you have come to a point where you accept that it is VLC but not exploitable.

No, I don't see where the VLC bug is.

Noone else makes it crash, and you refuse to share your details.

It could even be your video drivers.

Changed 6 years ago by gregory gascon

WinDBG dump on Windows 7 x64 VLC 2.1.5

comment:17 Changed 6 years ago by gregory gascon

Not reproducible on VLC 2.2.0 RC2

comment:18 Changed 6 years ago by Veysel

For further technical details refer to

VLC Player 2.1.5 Write Access Violation (CVE-2014-9598) MITRE: http://cve.mitre.org/cgi-bin/cvename.cgi?name=2014-9598 NIST: https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-9598

VLC Player 2.1.5 DEP Access Violation (CVE-2014-9597) MITRE: http://cve.mitre.org/cgi-bin/cvename.cgi?name=2014-9597 NIST: https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-9597

comment:19 Changed 6 years ago by Jean-Baptiste Kempf

This is not further technical details, this is the same.

And once again, this is still not a full backtrace.

Not to mention if the issue is in libavcodec or VLC or the video driver.

Last edited 6 years ago by Jean-Baptiste Kempf (previous) (diff)

Changed 6 years ago by gregory gascon

Attachment: vlc-2.1.5-13390.dmp added

WinDBG minidump - Write Access Violation

comment:20 Changed 6 years ago by gregory gascon

Veysel,

In picture_t structure, you have :

 /** Private data - the video output plugin might want to put stuff here to
 * keep track of the picture */
 picture_sys_t * p_sys;

 /** This way the picture_Release can be overloaded */
 struct
 {
   vlc_atomic_t refcount;
   void (*pf_destroy)( picture_t * );
   picture_gc_sys_t *p_sys;
 } gc;

And in 2.1.5 picture.c>picture_Release(picture_t * picture)

if( vlc_atomic_dec( &p_picture->gc.refcount ) == 0 &&
p_picture->gc.pf_destroy )
p_picture->gc.pf_destroy( p_picture );

Pointer p_sys can permit to another video output plugin (libavcodec ??) to perform a buffer overflow and overwrite pf_destroy... So it's NOT a VLC security issue

Last edited 6 years ago by gregory gascon (previous) (diff)

comment:21 Changed 6 years ago by Veysel

Resolution: notvlc
Status: closedreopened

Changed 6 years ago by Veysel

Attachment: windbg.TXT added

windbgxpsp3.TXT

comment:22 Changed 6 years ago by Jean-Baptiste Kempf

	directsound audio output error: cannot initialize DirectSound
	main audio output error: module not functional
	main decoder error: failed to create audio output

This is not even a working version of Windows XP.

comment:23 in reply to:  20 ; Changed 6 years ago by Jean-Baptiste Kempf

Replying to gregory gascon:

Pointer p_sys can permit to another video output plugin (libavcodec ??) to perform a buffer overflow and overwrite pf_destroy... So it's NOT a VLC security issue

p_sys is internal to one plugin.

comment:24 Changed 6 years ago by Jean-Baptiste Kempf

And there is no reason to reopen a bug if it is fixed in 2.2.0

comment:25 in reply to:  22 ; Changed 6 years ago by Veysel

Replying to jb:

	directsound audio output error: cannot initialize DirectSound
	main audio output error: module not functional
	main decoder error: failed to create audio output

This is not even a working version of Windows XP.

The windbgxpsp3.TXT attachment on Windows XP SP3

comment:26 in reply to:  23 Changed 6 years ago by gregory gascon

Replying to jb:

Replying to gregory gascon:

Pointer p_sys can permit to another video output plugin (libavcodec ??) to perform a buffer overflow and overwrite pf_destroy... So it's NOT a VLC security issue

p_sys is internal to one plugin.

Yes yes that's what I've understood. Unfortunately I don't have yet the chance to compile it in debug to exactly analyze this overflow. And yes you are right, this ticket should be closed because this bug does not exist in master branch, with some protection in the picture_Release function.

comment:27 Changed 6 years ago by Veysel

If you want to close this ticket please update vlc player version from 2.1.5 to 2.2.0 in this page http://www.videolan.org/vlc/ and http://www.videolan.org/vlc/download-windows.html.

Because almost every Windows user download vlc those pages.

comment:28 in reply to:  25 Changed 6 years ago by Jean-Baptiste Kempf

Replying to Veysel:

Replying to jb:

	directsound audio output error: cannot initialize DirectSound
	main audio output error: module not functional
	main decoder error: failed to create audio output

This is not even a working version of Windows XP.

The windbgxpsp3.TXT attachment on Windows XP SP3

You don't have directsound and you claim it's a full XP installation?

I doubt it.

comment:29 in reply to:  27 Changed 6 years ago by gregory gascon

Replying to Veysel:

If you want to close this ticket please update vlc player version from 2.1.5 to 2.2.0 in this page http://www.videolan.org/vlc/ and http://www.videolan.org/vlc/download-windows.html.

Because almost every Windows user download vlc those pages.

In software development, tickets are closed when the issues are fixed in the repository, not in production releases. Hence you can know when to release your binary... when no major feature or bug ticket is still opened...

Last edited 6 years ago by gregory gascon (previous) (diff)

comment:30 Changed 6 years ago by Jean-Baptiste Kempf

Milestone: Bugs paradize2.2.0
Resolution: notvlc
Status: reopenedclosed

So, in the end, all this fuss was about a crash in YOUR Virtualbox video driver, on a non-maintained version of Windows. And you claim the issue was VLC.

Not to mention failing to report the proper way...

Note: See TracTickets for help on using tickets.