GNOME Bugzilla – Bug 655606
Crash when using uninitialized KernelMatrix struct
Last modified: 2011-11-07 22:10:55 UTC
Created attachment 192889 [details] Crash on invalid read of uninitialized KernelMatrix Overview : when a SVG file contains a filter using feConvolveMatrix, rsvg-filter.c Steps to Reproduce : $> rsvg-convert uninitialized_KernelMatrix_crash.svg Actual Results: when the attached SVG is open by a librsvg-enabled application (rsvg-convert, geeqie, eog, ...), the application will because some uninitialized values are used Expected Results : no crash Build Date & Platform : version 2.34.0 compiled from source, with symbols. Tested under Linux Additional Information : (gdb) r uninitialized_KernelMatrix_crash.svg Starting program: /usr/local/bin/rsvg-convert uninitialized_KernelMatrix_crash.svg [Thread debugging using libthread_db enabled] Program received signal SIGSEGV, Segmentation fault. 0x001413eb in rsvg_filter_primitive_convolve_matrix_set_atts (self=0x805d810, ctx=0x8058800, atts=0x80523b0) at rsvg-filter.c:1211 1211 filter->divisor += filter->KernelMatrix[j + i * filter->orderx]; (gdb) bt
+ Trace 227946
Oops, I submitted the form too early ... Additional info : function rsvg_filter_primitive_convolve_matrix_set_atts in rsvg-convert.c will used an uninitialized filter->KernelMatrix if "kernelMatrix" is not defined in the SVG file. My PoC will crash on line 1211 when trying to access the content of the structure. It's possible to crash on free() too.
Same as bug 624835 which has a patch. *** This bug has been marked as a duplicate of bug 624835 ***