NULL Pointer Dereference in CS104_IPAddress_setFromString
Description
A NULL Pointer Dereference was discovered in CS104_IPAddress_setFromString at src/iec60870/cs104/cs104_slave.c:785. The vulnerability causes a segmentation fault and application crash.
If the ipAddrStr is NULL, strchr() will crash. Should there be a check?
version
0d5e76e
System information
Ubuntu 20.04 focal, AMD EPYC 7742 64-Core @ 16x 2.25GHz
gdb
LD_PRELOAD="/root/tools/preeny-master/build/lib/libdesock.so" ./cs104_redundancy_server
New connection request from (null)
[1] 128322 segmentation fault LD_PRELOAD="/root/tools/preeny-master/build/lib/libdesock.so"
Yes, I will add a check. But the question is why is ipAddrStr == NULL? Seems that can only happen when the getpeername socket function doesn't return a valid address.
NULL Pointer Dereference in CS104_IPAddress_setFromString
Description
A NULL Pointer Dereference was discovered in CS104_IPAddress_setFromString at src/iec60870/cs104/cs104_slave.c:785. The vulnerability causes a segmentation fault and application crash.
If the ipAddrStr is NULL, strchr() will crash. Should there be a check?
version
0d5e76e
System information Ubuntu 20.04 focal, AMD EPYC 7742 64-Core @ 16x 2.25GHz
gdb