<!-- XE-13322 · [net/gossip.go] C6: broadcast() tidak handle message yang tidak valid — DoS · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13322>. The page is the record; this is the same page for reading.*

XE-13322 · Bounty

# \[net/gossip.go\] C6: broadcast() tidak handle message yang tidak valid — DoS

Closed · invalid
—
[xe#467](https://github.com/xeprotocol/xe/issues/467)
filed 2026-11-12 02:56 UTC
by wahyu20260100233-ops

Verdict
:   Invalid

Tier
:   —

Claimed
:   —

Area
:   P2P / sync

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 00:51 UTC

Told
:   2026-11-20 00:50 UTC

### Patches

None linked.

### History

- [559521](https://bounty.xe.network/log/559521) 2026-11-20 00:50 UTC reply.mirrored
- [558581](https://bounty.xe.network/log/558581) 2026-11-20 00:49 UTC reply.sent
- [554718](https://bounty.xe.network/log/554718) 2026-11-20 00:37 UTC github.state\_pushed
- [554670](https://bounty.xe.network/log/554670) 2026-11-20 00:37 UTC github.labels
- [553410](https://bounty.xe.network/log/553410) 2026-11-20 00:33 UTC proposal.adopted
- [553274](https://bounty.xe.network/log/553274) 2026-11-20 00:33 UTC proposal.adopted
- [553273](https://bounty.xe.network/log/553273) 2026-11-20 00:33 UTC ticket.status new → closed
- [553014](https://bounty.xe.network/log/553014) 2026-11-20 00:33 UTC proposal.adopted
- [553013](https://bounty.xe.network/log/553013) 2026-11-20 00:33 UTC ticket.facts area
- [553012](https://bounty.xe.network/log/553012) 2026-11-20 00:33 UTC proposal.adopted
- [553011](https://bounty.xe.network/log/553011) 2026-11-20 00:33 UTC ticket.facts
- [550038](https://bounty.xe.network/log/550038) 2026-11-20 00:26 UTC note.added

[Full history](https://bounty.xe.network/log?ref=XE-13322) · [JSON](https://bounty.xe.network/v1/tickets/XE-13322) · [markdown](https://bounty.xe.network/XE-13322.md)

### 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 desk**team2026-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.
