uber-archive / statsrelay

A consistent-hashing relay for statsd and carbon metrics
Other
101 stars 28 forks source link

Null pointer dereference in parse_config #72

Open gy741 opened 7 years ago

gy741 commented 7 years ago

Hi.

I found a Null pointer dereference testcase.

Please confirm.

Thanks.

Version : statsrelay 1.6.8 OS: Ubuntu 16.04.2 32bit Command: ./statsrelay -c $FILE PoC: PoC


ASAN:DEADLYSIGNAL
=================================================================
==6260==ERROR: AddressSanitizer: SEGV on unknown address 0x00000004 (pc 0x08169ef6 bp 0xbfe6c2b8 sp 0xbfe6bfa0 T0)
==6260==The signal is caused by a READ memory access.
==6260==Hint: address points to the zero page.
    #0 0x8169ef5 in parse_config /home/karas/gwanyeong/statsrelay/src/yaml_config.c:156:20
    #1 0x816c15c in load_config /home/karas/gwanyeong/statsrelay/src/main.c:59:23
    #2 0x816b6e0 in main /home/karas/gwanyeong/statsrelay/src/main.c:140:8
    #3 0xb7485275 in __libc_start_main /build/glibc-4TWal_/glibc-2.24/csu/../csu/libc-start.c:291
    #4 0x8060667 in _start (/home/karas/gwanyeong/statsrelay/src/statsrelay+0x8060667)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/karas/gwanyeong/statsrelay/src/yaml_config.c:156:20 in parse_config
==6260==ABORTING