Add a New Comment (Rich Markup)
I fixed it, by preventing the program from being installed: https://git.savannah.gnu.org/cgit/pspp.git/commit/?id=8596d6eb21e40ffaf9321d1cb779333de3126b50.
## short summary Hello, I was testing my fuzzer and find a heap buffer overflow in read_string, pspp-1.6.2 ## Environment Ubuntu 21.10 gcc 11.2.0 pspp-1.6.2 ## step to reproduce ./configure --disable-shared --without-gui && make -j$(nproc) ./pspp-dump-sav $POC ## ASan output ================================================================= ==2607491==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000111 at pc 0x0000004d6a35 bp 0x7fffc66178b0 sp 0x7fffc66178a8 WRITE of size 1 at 0x602000000111 thread T0 #0 0x4d6a34 in read_string /home/kdsj/workspace/fuzz/verify/pspp-1.6.2/utilities/pspp-dump-sav.c:1661:20 #1 0x4d6a34 in read_character_encoding /home/kdsj/workspace/fuzz/verify/pspp-1.6.2/utilities/pspp-dump-sav.c:1020:3 #2 0x4d6a34 in read_extension_record /home/kdsj/workspace/fuzz/verify/pspp-1.6.2/utilities/pspp-dump-sav.c:649:7 #3 0x4d6a34 in main /home/kdsj/workspace/fuzz/verify/pspp-1.6.2/utilities/pspp-dump-sav.c:219:15 #4 0x7f1baa451fcf in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #5 0x7f1baa45207c in __libc_start_main csu/../csu/libc-start.c:409:3 #6 0x41f384 in _start (/home/kdsj/workspace/fuzz/verify/pspp-1.6.2/utilities/pspp-dump-sav+0x41f384) 0x602000000111 is located 0 bytes to the right of 1-byte region [0x602000000110,0x602000000111) allocated by thread T0 here: #0 0x49a3c2 in calloc /home/kdsj/workspace/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:154:3 #1 0x4da045 in xcalloc /home/kdsj/workspace/fuzz/verify/pspp-1.6.2/gl/xmalloc.c:297:19 #2 0x7f1baa451fcf in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 SUMMARY: AddressSanitizer: heap-buffer-overflow /home/kdsj/workspace/fuzz/verify/pspp-1.6.2/utilities/pspp-dump-sav.c:1661:20 in read_string Shadow bytes around the buggy address: 0x0c047fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff8000: fa fa fd fa fa fa fd fd fa fa fd fd fa fa fd fa 0x0c047fff8010: fa fa fd fa fa fa fd fd fa fa fd fd fa fa fd fa =>0x0c047fff8020: fa fa[01]fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 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 ==2607491==ABORTING ## Credit Han Zheng(NCNIPC of China, Hexhive)
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only logged-in users can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 3 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.11