GNOME Bugzilla – Bug 703249
Segfault in g_slist_foreach on a corrupted (fuzzed) sxc file
Last modified: 2013-06-28 21:00:02 UTC
Segfault in g_slist_foreach on a corrupted (fuzzed) sxc file. Seems to crash in glib, but I will report it here for further analysis. Git versions of glib, goffice, gnumeric, libgsf and libxml2. Test case: http://jutaky.com/fuzzing/gnumeric_case_4096_3.sxc Program received signal SIGSEGV, Segmentation fault. 0x00007ffff3b68dea in g_slist_foreach (list=0x3, func=0x7ffff3b4e19b <g_free>, user_data=0x0) at gslist.c:895 895 GSList *next = list->next; (gdb) bt
+ Trace 232160
-- Juha Kylmänen Research Assistant, OUSPG
definitely our proble. We are passing list=0x3 to g_slist_free_full in your trace. It crashes for me elsewhere.
==13585== Use of uninitialised value of size 8 ==13585== at 0x154AB0FD: odf_text_content_end (openoffice-read.c:1643) ==13585== by 0x154AB6C1: oo_cell_content_end (openoffice-read.c:4075) ==13585== by 0x5942861: gsf_xml_in_end_element (gsf-libxml.c:844) ==13585== by 0x5DCA6EC: ??? (in /usr/lib64/libxml2.so.2.7.8) ==13585== by 0x5DD4152: xmlParseElement (in /usr/lib64/libxml2.so.2.7.8) ==13585== by 0x5DD2D67: xmlParseContent (in /usr/lib64/libxml2.so.2.7.8) ==13585== by 0x5DD3F8A: xmlParseElement (in /usr/lib64/libxml2.so.2.7.8) ==13585== by 0x5DD2D67: xmlParseContent (in /usr/lib64/libxml2.so.2.7.8) ==13585== by 0x5DD3F8A: xmlParseElement (in /usr/lib64/libxml2.so.2.7.8) ==13585== by 0x5DD2D67: xmlParseContent (in /usr/lib64/libxml2.so.2.7.8) ==13585== by 0x5DD3F8A: xmlParseElement (in /usr/lib64/libxml2.so.2.7.8) ==13585== by 0x5DD2D67: xmlParseContent (in /usr/lib64/libxml2.so.2.7.8) ==13585== by 0x5DD3F8A: xmlParseElement (in /usr/lib64/libxml2.so.2.7.8)
This problem was really unrelated to the file being fuzzed. It should have crashed even in the unfuzzed version. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Is finding these getting harder by now?
Yes. Each fixed bug increases robustness and makes finding the next successful case harder.