You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opened #133, which addresses the seed null-termination report here.
Status of the three bugs raised in this thread, checked against current main:
seed null-termination (argparser.h): still present. The config path now
does malloc(55); memset(0,55); memcpy(…,55), which fills all 55 bytes with
no terminator, so sanityCheckSeed()'s strlen() reads past the allocation
(confirmed under ASAN: READ of size 56). Also over-reads the source if the
configured seed is shorter than 55 chars. Fixed in Fix buffer overflows when parsing seed and node_ip from a config file #133 (allocate 56, copy at
most the value's length). While there I also bounded the adjacent node_ip
copy, which could overflow its 64-byte buffer for a value longer than 64 chars.
printSystemInfoFromNode hex (was nodeUtils.cpp:103): already resolved — byteToHex null-terminates via snprintf and the buffer is now char hex[65].
getNodeIpList crash (was nodeUtils.cpp:1054): already resolved — the
current peer loop in node_utils.cpp is bounded (for i < 4 over peers[4][4]).
So only the seed/config-parse part remained; #133 covers it.
Activity
wilricknl commentedon Apr 3, 2024
Another issue with
printSystemInfoFromNodein this line:qubic-cli/nodeUtils.cpp
Line 103 in 3a10e27
Issue:
Crashes upon log, because hex is not null-terminated.
Reproduction
qubic-cli.exe -nodeip "62.2.98.74" -getsysteminfoPossible fix:
At first I just wanted to just open an issue, because I didn't see a point in an MR for 1 line, but maybe I will make an MR if I run into more stuff.
wilricknl commentedon Apr 3, 2024
Also a null-termination bug in parsing the seed from a config file.
Line:
qubic-cli/argparser.h
Line 167 in 3a10e27
Possible fix:
Merge pull request qubic#13 from qubic-network/release/ep84
parthod0x commentedon Oct 7, 2026
Opened #133, which addresses the seed null-termination report here.
Status of the three bugs raised in this thread, checked against current
main:does
malloc(55); memset(0,55); memcpy(…,55), which fills all 55 bytes withno terminator, so
sanityCheckSeed()'sstrlen()reads past the allocation(confirmed under ASAN:
READ of size 56). Also over-reads the source if theconfigured seed is shorter than 55 chars. Fixed in Fix buffer overflows when parsing seed and node_ip from a config file #133 (allocate 56, copy at
most the value's length). While there I also bounded the adjacent
node_ipcopy, which could overflow its 64-byte buffer for a value longer than 64 chars.
printSystemInfoFromNodehex (was nodeUtils.cpp:103): already resolved —byteToHexnull-terminates viasnprintfand the buffer is nowchar hex[65].getNodeIpListcrash (was nodeUtils.cpp:1054): already resolved — thecurrent peer loop in
node_utils.cppis bounded (for i < 4overpeers[4][4]).So only the seed/config-parse part remained; #133 covers it.
Fix buffer overflows when parsing seed and node_ip from a config file (…