-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AddressSanitizer report LeakSanitizer: SEGV when use the posterize #15
Comments
Hi @NISL-SecurityGroup . Maybe?: CFLAGS ?= -g ... and > gdb ./posterize
(gdb): r SEGV.png |
Hello, thank you for your reply, we refer to your comments and added The result of running without ASAN:normal operation:$ ./posterize -Q 95 SEGV.png
error: gamma value does not match sRGB
libpng warning: Image width exceeds user limit in IHDR
error: Invalid IHDR data
Segmentation fault (core dumped) using gdb:(gdb) r -Q 95 crash01.png
Starting program: /docker/mp/posterize -Q 95 crash01.png
warning: Error disabling address space randomization: Operation not permitted
error: gamma value does not match sRGB
libpng warning: Invalid image width in IHDR
libpng warning: Image width exceeds user limit in IHDR
error: Invalid IHDR data
Program received signal SIGSEGV, Segmentation fault.
0x00007f2a7be16153 in ?? () from /lib/x86_64-linux-gnu/libpng16.so.16 The result of running with ASAN:normal operation:$ ./posterize-asan -Q 95 SEGV.png
error: gamma value does not match sRGB
AddressSanitizer:DEADLYSIGNAL
=================================================================
==563==ERROR: AddressSanitizer: SEGV on unknown address 0x020072988bb5 (pc 0x55b63da426d0 bp 0x0fff94c85cde sp 0x7ffca642e6c0 T0)
==563==The signal is caused by a READ memory access.
\#0 0x55b63da426d0 in rwpng_write_image24 /docker/mp/rwpng.c:556
\#1 0x55b63da31666 in main /docker/mp/posterize.c:526
\#2 0x7fbfdd8590b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
\#3 0x55b63da3230d in _start (/docker/mp/posterize+0x530d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /docker/mp/rwpng.c:556 in rwpng_write_image24
==563==ABORTING using gdb:(gdb) r -Q 95 crash01.png
Starting program: /docker/mp/posterize -Q 95 crash01.png
warning: Error disabling address space randomization: Operation not permitted
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
error: gamma value does not match sRGB
Program received signal SIGSEGV, Segmentation fault.
0x0000557f92da56d0 in rwpng_write_image24 (outfile=outfile@entry=0x7fdc9282e6a0 <_IO_2_1_stdout_>, mainprog_ptr=0xfffdacdf528, mainprog_ptr@entry=0x7ffed66faa90, filter=<optimized out>) at rwpng.c:556
556 png_set_IHDR(png_ptr, info_ptr, mainprog_ptr->width, mainprog_ptr->height, |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
Environment
Ubuntu 18.04,64 bit
Command
Compile test program:
Compile test program with address sanitizer:
Result
The result of running without ASAN:
Information obtained by using ASAN:
Description
Poc
Poc file is this.
The text was updated successfully, but these errors were encountered: