GNOME Bugzilla – Bug 720425
Use-after-free in gnm_expr_sharer_share on a fuzzed xlsx file
Last modified: 2013-12-13 21:29:29 UTC
Use-after-free in gnm_expr_sharer_share on a fuzzed xlsx file. Git versions of glib, goffice, gnumeric, libgsf and libxml2. Test case: http://jutaky.com/fuzzing/gnumeric_case_2339_184314.xlsx ==13650== ERROR: AddressSanitizer: heap-use-after-free on address 0x600400209dd8 at pc 0x7f67f761e736 bp 0x7fffeb318890 sp 0x7fffeb318888 READ of size 8 at 0x600400209dd8 thread T0 #0 0x7f67f761e735 in gnm_expr_sharer_share /gnumeric/src/expr.c:2928 #1 0x7f67f7a7b2b4 in workbook_share_expressions /gnumeric/src/workbook.c:623 (discriminator 1) #2 0x7f67f7a9ae7f in workbook_view_new_from_input /gnumeric/src/workbook-view.c:1294 #3 0x7f67f7a9b43f in workbook_view_new_from_uri /gnumeric/src/workbook-view.c:1341 #4 0x40a6e0 in main /gnumeric/src/main-application.c:322 #5 0x7f67f221abc4 in __libc_start_main ??:? #6 0x403de8 in _start ??:? -- Juha Kylmänen Research Assistant, OUSPG
==11793== Invalid read of size 8 ==11793== at 0x4EEED93: gnm_expr_sharer_share (expr.c:2928) ==11793== by 0x4F9C8C3: workbook_share_expressions (workbook.c:623) ==11793== by 0x4FA0904: workbook_view_new_from_input (workbook-view.c:1294) ==11793== by 0x4FA0B0C: workbook_view_new_from_uri (workbook-view.c:1341) ==11793== by 0x404756: convert (ssconvert.c:696) ==11793== by 0x403A2C: main (ssconvert.c:860) ==11793== Address 0x12bc9c88 is 8 bytes inside a block of size 16 free'd ==11793== at 0x4C29D4E: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==11793== by 0x4EEEDCC: gnm_expr_sharer_share (expr.c:2936) ==11793== by 0x4F9C8C3: workbook_share_expressions (workbook.c:623) ==11793== by 0x4FA0904: workbook_view_new_from_input (workbook-view.c:1294) ==11793== by 0x4FA0B0C: workbook_view_new_from_uri (workbook-view.c:1341) ==11793== by 0x404756: convert (ssconvert.c:696) ==11793== by 0x403A2C: main (ssconvert.c:860)
This is how it would look if something in the importer forgot to ref an expression somewhere.
...or had an extra unref. This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.