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

SEGV in function readFromBMP #4

Open
fouzhe opened this Issue Jul 23, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@fouzhe

fouzhe commented Jul 23, 2018

I used Clang 6.0 and AddressSanitizer to build jpeg-encoder, this file can cause SEGV in function readFromBMP when executing this command:

./a.out SEGV_readFromBMP

This is the ASAN information:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==26187==ERROR: AddressSanitizer: SEGV on unknown address 0x602003000010 (pc 0x7f6485b4a3f2 bp 0x000000000018 sp 0x7ffe77d368f8 T0)
==26187==The signal is caused by a WRITE memory access.
    #0 0x7f6485b4a3f1  (/lib/x86_64-linux-gnu/libc.so.6+0x8f3f1)
    #1 0x7f6485b3403d  (/lib/x86_64-linux-gnu/libc.so.6+0x7903d)
    #2 0x7f6485b29235 in fread (/lib/x86_64-linux-gnu/libc.so.6+0x6e235)
    #3 0x49e7e6 in fread /home/fouzhe/llvm/llvm/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:977
    #4 0x51c515 in JpegEncoder::readFromBMP(char const*) /home/fouzhe/my_fuzz/jpeg_encoder/jpeg_encoder.cpp:202:17
    #5 0x51a88b in main /home/fouzhe/my_fuzz/jpeg_encoder/test.cpp:16:14
    #6 0x7f6485adb82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #7 0x41a638 in _start (/home/fouzhe/my_fuzz/jpeg_encoder/a.out+0x41a638)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x8f3f1)
==26187==ABORTING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment