Skip to content
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

Segmentation fault in catdoc.c:34 at libdoc master branch(2019/1/29) when using libdoc.a #6

Closed
wuk0n9 opened this issue Jan 30, 2019 · 1 comment

Comments

@wuk0n9
Copy link

wuk0n9 commented Jan 30, 2019

A parameter which do not exist will lead to Segmentation fault in catdoc.c:34 at libdoc master branch(2019/1/29) when using libdoc.a

Triggered by

gcc main.c -o doc2txt -L ../build/ -lasan -fsanitize=address -ggdb ../build/libdoc.a
doc2txt [A filename which not exist]

Poc
./doc2txt d_000094,sig_06,src_000540,op_havoc,rep_2:

The ASAN information is as follows:

root:~/libdoc-master/example# ./doc2txt d_000094,sig_06,src_000540,op_havoc,rep_2:
ASAN:SIGSEGV
=================================================================
==37085==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000401a4a bp 0x0fffbea4dd3e sp 0x7ffdf526e9e0 T0)
    #0 0x401a49 in doc2text /root/libdoc-master/catdoc.c:34
    #1 0x4018ea in main /root/libdoc-master/example/main.c:23
    #2 0x7f60ad96782f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #3 0x401668 in _start (/root/libdoc-master/example/doc2txt+0x401668)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /root/libdoc-master/catdoc.c:34 doc2text
==37085==ABORTING

FoundBy: wu.an.1900@gamil.com

@kasha13
Copy link
Collaborator

kasha13 commented Jan 31, 2019

Fixed. Thank you.

@kasha13 kasha13 closed this as completed Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants