Deterministic Network Halt: How a Nil Pointer in BSC Geth Can Stop a Blockchain
The CreateContract function in BSC Geth did not validate account pointers for addresses absent from the state database, so a crafted contract-creation transaction would cause a nil pointer dereference panic. Because every validator would hit the same panic, the author claims the network could stop producing blocks.
blog.blockmagnates.com
Published on blog.blockmagnates.com
Introduction In the high-stakes world of blockchain security, the spotlight usually falls on clever DeFi flash loan exploits or complex smart contract logic errors. However, the most devastating vulnerabilities often lie deeper — in the core execution engine of the network itself.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the contract-creation path dereferenced an account pointer without checking whether the account existed in the state database.
Impact
A single crafted transaction could deterministically crash every validator and halt block production, though the text only demonstrates this in an isolated test rather than on the live network.
What the attacker needed
Ability to submit a transaction to BSC; vulnerable BSC Geth version
The fix
The code should validate account pointers and return an error instead of dereferencing a missing state entry.
How it was found
- Set up a mock state database for testing.
- Choose an address that is not present in the database.
- Call CreateContract with that address.
- Observe the runtime panic from the nil pointer dereference.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A pointer is a reference to a place in memory; if the program follows a pointer that points nowhere (a 'nil' pointer), it crashes. In a blockchain, every computer that checks a block runs the same code, so one transaction that crashes the code crashes every computer at once and the chain cannot agree on new blocks.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.