From fc0b78e8a95e865656c4cfbc59bd2d1b32e2ee91 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 25 Apr 2025 21:24:01 +0200 Subject: [PATCH] eth/protocols/eth: validate BlockRangeUpdate messages --- eth/protocols/eth/handlers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eth/protocols/eth/handlers.go b/eth/protocols/eth/handlers.go index 73f299096e..3e2dd4537e 100644 --- a/eth/protocols/eth/handlers.go +++ b/eth/protocols/eth/handlers.go @@ -531,6 +531,9 @@ func handleBlockRangeUpdate(backend Backend, msg Decoder, peer *Peer) error { if err := msg.Decode(&update); err != nil { return err } + if err := update.Validate(); err != nil { + return err + } // We don't do anything with these messages for now, just store them on the peer. peer.lastRange.Store(&update) return nil