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

NULL pointer dereference in cbor_typeof #66

Open
gy741 opened this issue Dec 24, 2017 · 0 comments
Open

NULL pointer dereference in cbor_typeof #66

gy741 opened this issue Dec 24, 2017 · 0 comments
Labels

Comments

@gy741
Copy link

gy741 commented Dec 24, 2017

Hello.

I found a NULL pointer dereference in libcbor.

Please confirm.

Thanks.

Summary: NULL pointer dereference
OS: CentOS 7 64bit
Version: commit f4ec5a4
PoC Download: crash.zip

Steps to reproduce:
1.Download the .POC files.
2.Compile the source code with ASan.
3.Execute the following command
: ./readfile $POC

ASAN:DEADLYSIGNAL
=================================================================
==31346==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000020 (pc 0x0000004f32d7 bp 0x7ffe7ef988f0 sp 0x7ffe7ef988d0 T0)
==31346==The signal is caused by a READ memory access.
==31346==Hint: address points to the zero page.
    #0 0x4f32d6 in cbor_typeof /home/karas/libcbor/src/cbor/common.c:61:15
    #1 0x4e9683 in _cbor_nested_describe /home/karas/libcbor/src/cbor.c:260:10
    #2 0x4e9df8 in _cbor_nested_describe /home/karas/libcbor/src/cbor.c:353:4
    #3 0x4e963e in cbor_describe /home/karas/libcbor/src/cbor.c:388:2
    #4 0x4e7d5d in main /home/karas/libcbor/examples/readfile.c:77:2
    #5 0x7fdca2c113f0 in __libc_start_main /build/glibc-mXZSwJ/glibc-2.24/csu/../csu/libc-start.c:291
    #6 0x41ba09 in _start (/home/karas/libcbor/examples/readfile+0x41ba09)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/karas/libcbor/src/cbor/common.c:61:15 in cbor_typeof
==31346==ABORTING

================
[Acknowledgement]
This work was supported by ICT R&D program of MSIP/IITP. [R7518-16-1001, Innovation hub for high Performance Computing]

@PJK PJK added the bug label Jan 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants