Summary: | heap-use-after-free at devices/vector/gdevxps.c:1431 in xps_finish_image_path | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Suhwan <prada960808> |
Component: | General | Assignee: | Chris Liddell (chrisl) <chris.liddell> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mehmetgelisin, tcullum |
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: | poc |
Description
Suhwan
2019-10-31 18:10:53 UTC
This might need to be re-assigned ot either myself or Henry. This assignmen is just for an initial triage and to make suer it doesn't get forgotten. @Ken @Chris note that I tested this on ghostscript-9.25 with the PoC here and I got an entirely different backtrace: ==1298203==ERROR: AddressSanitizer: heap-use-after-free on address 0x62a000678250 at pc 0x000002664563 bp 0x7ffc94c166a0 sp 0x7ffc94c16690 [16/7539] READ of size 4 at 0x62a000678250 thread T0 #0 0x2664562 in igc_reloc_struct_ptr psi/igc.c:1279 #1 0x1ccd294 in basic_reloc_ptrs base/gsmemory.c:347 #2 0x26683fc in gc_do_reloc psi/igc.c:1246 #3 0x266c017 in gs_gc_reclaim psi/igc.c:450 #4 0x27764da in context_reclaim psi/zcontext.c:290 #5 0x2518dcc in gs_vmreclaim psi/ireclaim.c:163 #6 0x2518dcc in ireclaim psi/ireclaim.c:80 #7 0x24f2b8c in interp_reclaim psi/interp.c:447 #8 0x24bd784 in gs_main_finit psi/imain.c:914 #9 0x53174e in main psi/gs.c:138 #10 0x7f29b4ca71a2 in __libc_start_main ../csu/libc-start.c:308 #11 0x53c28d in _start (/home/moveax41h/analysis/dist-git/ghostscript/ghostscript-9.25/bin/gs+0x53c28d) 0x62a000678250 is located 80 bytes inside of 22536-byte region [0x62a000678200,0x62a00067da08) freed by thread T0 here: #0 0x7f29b5c9291f in __interceptor_free (/lib64/libasan.so.5+0x10d91f) #1 0x1bd5720 in alloc_free_clump base/gsalloc.c:2599 previously allocated by thread T0 here: #0 0x7f29b5c92d18 in __interceptor_malloc (/lib64/libasan.so.5+0x10dd18) #1 0x1cb97ae in gs_heap_alloc_bytes base/gsmalloc.c:193 SUMMARY: AddressSanitizer: heap-use-after-free psi/igc.c:1279 in igc_reloc_struct_ptr Shadow bytes around the buggy address: 0x0c54800c6ff0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c54800c7000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c54800c7010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c54800c7020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c54800c7030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c54800c7040: fd fd fd fd fd fd fd fd fd fd[fd]fd fd fd fd fd 0x0c54800c7050: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c54800c7060: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c54800c7070: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c54800c7080: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c54800c7090: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==1298203==ABORTING I'm not yet sure why or if the implications here are related or coincidental and this is an entirely separate use-after-free. (In reply to Todd from comment #3) <SNIP> > I'm not yet sure why or if the implications here are related or coincidental > and this is an entirely separate use-after-free. It's almost certainly a different problem, so please don't add new problems to existing (and especially closed) bugs. FWIW, I cannot reproduce what you see with the current code, 9.52 nor the pending 9.53 release code, building with clang 10. |