New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 3 users
Status: Fixed
Owner:
Email to this user bounced
Closed: Nov 2014
Cc:



Sign in to add a comment
Flash memory corruption in the G711 codec with 4-byte samples
Reported by cevans@google.com, Oct 8 2014 Back to list
There is a memory corruption due a wild memmove() in the G711 codec. I think it affects all Flash builds except the Pepper plug-in (as used by Chrome). Specifically, run the PoC against Flash in Internet Explorer, and a crash is observed.

The PoC is the attachment EmbedSoundG711.swf. Press the "Play" button to trigger the crash. (This bug can be triggered without user interaction, I just happened to base the crafted attack file on a SWF that uses a button.)

EmbedSoundG711.swf is based on EmbedSound.swf (also attached), with the difference that a byte 0x2b is changed to 0x8f. This has the affect of changing codec selection to G711. Note that EmbedSound.swf is simply an uncompressed copy of the demo SWF in the "Embedded Sounds" section at http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf60546-7ff2.html

Interestingly, although the crash is in memmove() with a small negative value for "length", this would appear exploitable. In some of the mutated test cases we've observed, the crash occurs not in memmove(), but in another thread that is busy parsing and rendering, where its structures have been trashed by the in-process memmove().

This bug is subject to a 90 day disclosure deadline. If 90 days elapse
without a broadly available patch, then the bug report will automatically
become visible to the public.
 
EmbedSoundG711.swf
566 KB Download
EmbedSound.swf
566 KB Download
Comment 1 by cevans@google.com, Oct 8 2014
Labels: Id-3080
Comment 2 by cevans@google.com, Nov 8 2014
Labels: CVE-2014-0576
Comment 3 by cevans@google.com, Nov 20 2014
Labels: -Restrict-View-Commit
Status: Fixed
Comment 5 by cevans@google.com, Mar 12 2015
Attaching a libpepflashplayer.so for Chrome Linux x64.

It's based on:
Google Chrome	41.0.2272.89 (Official Build)
Flash	17.0.0.134

... but with the vulnerability patched back in, which can be done with the following (unique) asm opcode edit:

0x41	0xbc	0x1e	0x05	0x00	0x00    mov    $0x51e,%r12d
->
0x41	0xbc	0xde	0x03	0x00	0x00    mov    $0x3de,%r12d

This may be useful in case anyone wished to play with this vulnerability.
libpepflashplayer.so.hacked.17.0.0.134.gz
6.2 MB Download
Comment 6 by cevans@google.com, Mar 19 2015
Attaching a working exploit for Linux x64; lots of notes inside the source file.
G711Memcpy.swf
21.2 KB Download
baa.mp3
18.0 KB Download
G711Memcpy.as
10.8 KB Download
Comment 8 by cevans@google.com, Mar 19 2015
This exploit was presented at CanSecWest. Attaching a PDF of the slides used.
Taming wild copies (1).pdf
1.2 MB Download
Sign in to add a comment