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

XE-13326 · Bounty

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

Closed · invalid
—
[xe#471](https://github.com/xeprotocol/xe/issues/471)
filed 2026-11-12 02:57 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

- [559492](https://bounty.xe.network/log/559492) 2026-11-20 00:50 UTC reply.mirrored
- [558571](https://bounty.xe.network/log/558571) 2026-11-20 00:49 UTC reply.sent
- [554234](https://bounty.xe.network/log/554234) 2026-11-20 00:37 UTC github.state\_pushed
- [554228](https://bounty.xe.network/log/554228) 2026-11-20 00:37 UTC github.labels
- [553406](https://bounty.xe.network/log/553406) 2026-11-20 00:33 UTC proposal.adopted
- [553265](https://bounty.xe.network/log/553265) 2026-11-20 00:33 UTC proposal.adopted
- [553264](https://bounty.xe.network/log/553264) 2026-11-20 00:33 UTC ticket.status new → closed
- [552993](https://bounty.xe.network/log/552993) 2026-11-20 00:33 UTC proposal.adopted
- [552992](https://bounty.xe.network/log/552992) 2026-11-20 00:33 UTC ticket.facts area
- [552991](https://bounty.xe.network/log/552991) 2026-11-20 00:33 UTC proposal.adopted
- [552990](https://bounty.xe.network/log/552990) 2026-11-20 00:33 UTC ticket.facts
- [550063](https://bounty.xe.network/log/550063) 2026-11-20 00:26 UTC note.added

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

### Report

## Ringkasan

Kalau message tidak valid, broadcast bisa menyebabkan crash.

## 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

Crash 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
    }

    for _, pid := range peers {
        go g.sendToPeer(pid, key, msg)
    }
}

func (g *Gossip) isValidMessage(msg []byte) bool {
    // validasi message
    if len(msg) == 0 {
        return false
    }
    // dll
    return true
}
```

### 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-13326 and says what; it is read like any other.
