CVE-2018-18206
Description
In the client in Bytom before 1.0.6, checkTopicRegister in p2p/discover/net.go does not prevent negative idx values, leading to a crash.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In Bytom before 1.0.6, checkTopicRegister fails to prevent negative idx values, causing a crash.
Vulnerability
In the Bytom client before version 1.0.6, the function checkTopicRegister in p2p/discover/net.go does not prevent negative idx values. This vulnerability can be triggered during peer discovery when handling topic registration messages [1]. The flaw exists in the peer-to-peer discovery subsystem of the Bytom blockchain client [2].
Exploitation
An attacker on the network can send a crafted message with a negative idx value to a vulnerable Bytom node. No authentication is required, as the discovery protocol accepts messages from any peer. This causes the peer's node process to crash [1][4].
Impact
Successful exploitation leads to a denial-of-service condition: the targeted Bytom node crashes, disrupting its participation in the blockchain network [1]. The crash is limited to the node process; no code execution or data compromise is indicated in available references.
Mitigation
Upgrade to Bytom version 1.0.6 or later, which includes the fix for this issue [1][4]. The fix was implemented in pull request #1307 on GitHub and merged into the codebase [4]. No workaround is available for unpatched versions.
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/bytom/bytomGo | < 1.0.6 | 1.0.6 |
Affected products
2Patches
11ac3c8ac4f2bp2p/discv5: fix idx can be negative after uint convert to int(can cause crash) (#1307)
1 file changed · +1 −1
p2p/discover/net.go+1 −1 modified@@ -1221,7 +1221,7 @@ func (net *Network) checkTopicRegister(data *topicRegister) (*pong, error) { if hash != pongpkt.data.(*pong).TopicHash { return nil, errors.New("topic hash mismatch") } - if data.Idx < 0 || int(data.Idx) >= len(data.Topics) { + if int(data.Idx) < 0 || int(data.Idx) >= len(data.Topics) { return nil, errors.New("topic index out of range") } return pongpkt.data.(*pong), nil
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/advisories/GHSA-vc3x-gx6c-g99fghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2018-18206ghsaADVISORY
- github.com/Bytom/bytom/commit/1ac3c8ac4f2b1e1df9675228290bda6b9586ba42ghsax_refsource_MISCWEB
- github.com/Bytom/bytom/pull/1307ghsaWEB
- pkg.go.dev/vuln/GO-2021-0079ghsaWEB
News mentions
0No linked articles in our index yet.