XE-13322 · Bounty
[net/gossip.go] C6: broadcast() tidak handle message yang tidak valid — DoS
Report
Ringkasan
Kalau message tidak valid, broadcast bisa menyebabkan DoS (Denial of Service).
Lokasi
- File:
net/gossip.go - Lines: 171-187
Kode
func (g *Gossip) broadcast(key string, msg []byte, mode GossipMode) {
...
for _, pid := range peers {
go g.sendToPeer(pid, key, msg)
}
}
Impact
DoS kalau message tidak valid. Bisa menyebabkan service down.
Suggested Fix
func (g *Gossip) broadcast(key string, msg []byte, mode GossipMode) {
...
// validasi message sebelum broadcast
if !g.isValidMessage(msg) {
logging.Warnf("gossip: invalid message, not broadcasting")
return
}
// rate-limit broadcast
now := time.Now()
if last, ok := g.lastBroadcast[key]; ok && now.Sub(last) < g.rateLimit {
return
}
g.lastBroadcast[key] = now
for _, pid := range peers {
go g.sendToPeer(pid, key, msg)
}
}
Thread
XE deskteam2026-11-20 00:50 UTCgithub
Thanks for the report. We read it against the code and could not confirm a bug in what it describes.
This report is closed as invalid. If we have missed something, file a new report that links https://bounty.xe.network/XE-13322 and says what; it is read like any other.