Skip to content
Memory corruption Disclosed report CVE-2015-2717

Integer overflow in libstagefright (data tag in mp4) might lead to heap overflow

laf.intel Follow

Originally disclosed on Mozilla

  • Fixed in 6 days
  • Paid in 26 days
  • Disclosed after 6 days
Text
Created attachment 8592760
integer overflow PoC

A specially crafted mp4 file can cause a integer overflow in the MPEG4Extractor::parseMetaData() function. When 'size' is 0xffffffff a integer overflow will occur which leads to an allocation of a (almost) 0 bytes big buffer (https://dxr.mozilla.org/mozilla-central/source/media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp#2196).
Later the 0xffffffff bytes should be copied into the small buffer 'buffer' which would lead to a heap overflow.

Attached is a PoC which causes the integer overflow. On the tested firefox (build from mozilla-central) using a Nexus 5 (contrary to the expected behavior) no heap overflow occurred. This behavior might be caused by the implementation of read(). read() is called (with the anticipated 0xffffffff as size) but no write into the buffer occurs.

The original report as published on Mozilla's Bugzilla, by laf.intel. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A high-severity memory corruption bug in Audio/Video. Mozilla made it public on 20 April 2015 as CVE-2015-2717.

About Memory corruption

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by laf.intel

View all

3 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.