After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749121 - Out-of-bounds read in xlsx-write.c on a .gnumeric to xlsx conversion
Out-of-bounds read in xlsx-write.c on a .gnumeric to xlsx conversion
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export MS Excel (tm)
git master
Other Linux
: Normal critical
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2015-05-08 14:41 UTC by jutaky
Modified: 2015-05-09 14:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jutaky 2015-05-08 14:41:13 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
Comment 1 Morten Welinder 2015-05-09 14:34:01 UTC
That patch doesn't look right.  (Well, checking is fine, but we should
not see an underline value out of bounds there.)
Comment 2 Morten Welinder 2015-05-09 14:38:25 UTC
            <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.