Skip to content

Commit f259361

Browse files
authored
fix: ignore already known data column sidecars (#8542)
**Motivation** This was brought up in the Fusaka bug bounty, when we receive a already known data column sidecar with the same block header and column index, the gossip message is accepted and rebroadcast without any additional verification. This allows a malicious peer to send a data column sidecar with the same block header and column index but an invalid block header signature which we would accept and rebroadcast and get downscored by our peers. **Description** Ignore already known data column sidecars (based on block header and column index). We could also consider to run `validateGossipDataColumnSidecar` on those sidecars to penalize the node sending us the data but it's just additional work for us and `GossipAction.IGNORE` seems sufficient.
1 parent fe5f423 commit f259361

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/beacon-node/src/network/processor/gossipHandlers.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import {
3939
BlockError,
4040
BlockErrorCode,
4141
BlockGossipError,
42+
DataColumnSidecarErrorCode,
4243
DataColumnSidecarGossipError,
4344
GossipAction,
4445
GossipActionError,
@@ -304,7 +305,11 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
304305
...blockInput.getLogMeta(),
305306
index: dataColumnSidecar.index,
306307
});
307-
return blockInput;
308+
throw new DataColumnSidecarGossipError(GossipAction.IGNORE, {
309+
code: DataColumnSidecarErrorCode.ALREADY_KNOWN,
310+
columnIdx: dataColumnSidecar.index,
311+
slot,
312+
});
308313
}
309314
}
310315

0 commit comments

Comments
 (0)