No implementation of BLOB_SIDECAR_SUBNET_COUNT with no issue and no PR in the GitHub
The Lodestar client does not implement the BLOB_SIDECAR_SUBNET_COUNT constant from the consensus specification, which defines the number of blob sidecar subnets in the gossipsub protocol. This could lead to increased P2P network traffic when interacting with other clients, potentially exposing a vulnerability.
- Disclosed after under an hour
#37646 [BC-Insight] No implementation of BLOB_SIDECAR_SUBNET_COUNT with no issue and no PR in the GitHub
Submitted on Dec 11th 2024 at 14:10:06 UTC by @Pig46940 for Attackathon | Ethereum Protocol
- Report ID: #37646
- Report Type: Blockchain/DLT
- Report severity: Insight
- Target: https://github.com/chainsafe/lodestar
- Impacts:
- (Specifications) A bug in specifications with no direct impact on client implementations
Description
Brief/Intro
In the consensus specifications, BLOB_SIDECAR_SUBNET_COUNT should be implemented; however, it is not implemented in the Lodestar codebase.
https://github.com/ethereum/consensus-specs/blob/d8276acf06a05cf396951687119de55b725ca120/specs/deneb/p2p-interface.md_\\[New in Deneb:EIP4844]_
| Name | Value | Description |
|---|---|---|
BLOB_SIDECAR_SUBNET_COUNT |
6 |
The number of blob sidecar subnets used in the gossipsub protocol. |
Vulnerability Details
The coment left in the test code // TODO DENEB: Configure the blob subnets in a followup PR. BUT, I could not find the implementation in entire repository.
The BLOB_SIDECAR_SUBNET_COUNT defines the blob sidecar subnet count in the Gossipsub protocol. However, no implementation is found in the entire codebase.
I carefully checked the following code, which should contain the relevant logic, but found no implementation:
https://github.com/ChainSafe/lodestar/blob/dad9037e7739d5bcbccfe627e715ef40e9ba935b/packages/beacon-node/src/network/gossip/gossipsub.ts
The value is only defined in interopConfigs.ts with no implementation:
https://github.com/ChainSafe/lodestar/blob/dad9037e7739d5bcbccfe627e715ef40e9ba935b/packages/validator/test/unit/utils/interopConfigs.ts#L54
I could not understand why your project does not implement this specification logic though the GitHub:
https://github.com/search?q=repo%3AChainSafe%2Flodestar%20BLOB\\_SIDECAR\\_SUBNET\\_COUNT\\&type=code
Additionally, the following comment is left in the test code:
// TODO DENEB: Configure the blob subnets in a followup PR
However, I could not find the implementation in the entire repository.
Other clients
Other consensus clients have implemented this logic.
- Prysm
- Lighthouse
Impact Details
It is difficult to clearly understand the full impact; however, the blob sidecar network will increase certain limits when interacting with other clients. This may lead to an increase in P2P network traffic to some extent, potentially exposing a vulnerability that attackers could exploit.
References
Proof of Concept
Proof of Concept
Should be in like following code
for (const [fork, peersByBeaconBlobSidecarSubnet] of peersByBeaconBlobSidecarSubnetByFork.map) {
for (let subnet = 0; subnet < BLOB_SIDECAR_SUBNET_COUNT; subnet++) {
metricsGossip.peersByBeaconBlobSidecarSubnet.set(
{fork, subnet: attSubnetLabel(subnet)},
peersByBeaconBlobSidecarSubnet[subnet] ?? 0
);
}
}
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the developers did not implement the BLOB_SIDECAR_SUBNET_COUNT constant in the gossipsub configuration, leaving a TODO comment in the test code.
Impact
The blob sidecar network may see increased P2P traffic when interacting with other clients, potentially exposing a vulnerability that attackers could exploit.
What the attacker needed
None
The fix
The missing BLOB_SIDECAR_SUBNET_COUNT constant should be implemented in the gossipsub configuration as specified.
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 report has not been written yet. The Original tab links to the source.
The report says that a piece of software (Lodestar) is missing a setting that the official rules (the consensus specification) say it should have. This setting controls how many separate channels are used for sharing certain data (blob sidecars) across the network. Because it's missing, the software might handle network traffic differently from other clients, which could cause problems.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.