GNOME Bugzilla – Bug 749121
Out-of-bounds read in xlsx-write.c on a .gnumeric to xlsx conversion
Last modified: 2015-05-09 14:38:25 UTC
Git versions of gtk, glib, goffice, gnumeric, libgsf and libxml2. Test case: http://jutaky.com/fuzzing/gnumeric_case_24050_50459.2xlsx.gnumeric ssconvert gnumeric_case_24050_50459.2xlsx.gnumeric /tmp/out.xlsx ==9016==ERROR: AddressSanitizer: SEGV on unknown address 0x7f99d2e0ea78 (pc 0x7f9993242a45 sp 0x7ffc9d1afb20 bp 0x7ffc9d1afb50 T0) #0 0x7f9993242a44 in xlsx_write_font gnumeric/gnumeric/plugins/excel/xlsx-write.c:724 #1 0x7f9993243313 in xlsx_write_fonts gnumeric/gnumeric/plugins/excel/xlsx-write.c:793 #2 0x7f9993246ca1 in xlsx_write_styles gnumeric/gnumeric/plugins/excel/xlsx-write.c:1352 #3 0x7f999326acfa in xlsx_write_workbook gnumeric/gnumeric/plugins/excel/xlsx-write.c:3103 #4 0x7f999326c2a3 in xlsx2_file_save gnumeric/gnumeric/plugins/excel/xlsx-write.c:3264 #5 0x7f99b91940f8 in go_plugin_loader_module_func_file_save app/go-plugin-loader-module.c:366 #6 0x7f99b919b50a in go_plugin_file_saver_save app/go-plugin-service.c:948 #7 0x7f99b91a43ec in go_file_saver_save app/file.c:848 #8 0x7f99ba07d7bc in wbv_save_to_output gnumeric/gnumeric/src/workbook-view.c:1059 #9 0x7f99ba07dc76 in wb_view_save_to_uri gnumeric/gnumeric/src/workbook-view.c:1093 #10 0x7f99ba07e1e8 in wb_view_save_as gnumeric/gnumeric/src/workbook-view.c:1129 #11 0x408c24 in convert gnumeric/gnumeric/src/ssconvert.c:831 #12 0x409439 in main gnumeric/gnumeric/src/ssconvert.c:903 #13 0x7f99b27b97ff in __libc_start_main (/usr/lib/libc.so.6+0x207ff) #14 0x4040f8 in _start (apps/bin/ssconvert+0x4040f8) -- Juha Kylmänen
That patch doesn't look right. (Well, checking is fine, but we should not see an underline value out of bounds there.)
<gmr:Font Unit="10" Bold="0" Italic="0" Underline="270716211399" StrikeThrough="0">Helvetica</gmr:Font> I added a sanity check that filters it on load.