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

XE-13324 · Bounty

# \[net/gossip.go\] C8: broadcast() tidak handle message yang tidak valid — data loss

Closed · invalid
—
[xe#469](https://github.com/xeprotocol/xe/issues/469)
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

- [559506](https://bounty.xe.network/log/559506) 2026-11-20 00:50 UTC reply.mirrored
- [558575](https://bounty.xe.network/log/558575) 2026-11-20 00:49 UTC reply.sent
- [554167](https://bounty.xe.network/log/554167) 2026-11-20 00:36 UTC github.state\_pushed
- [554164](https://bounty.xe.network/log/554164) 2026-11-20 00:36 UTC github.labels
- [553408](https://bounty.xe.network/log/553408) 2026-11-20 00:33 UTC proposal.adopted
- [553269](https://bounty.xe.network/log/553269) 2026-11-20 00:33 UTC proposal.adopted
- [553268](https://bounty.xe.network/log/553268) 2026-11-20 00:33 UTC ticket.status new → closed
- [553001](https://bounty.xe.network/log/553001) 2026-11-20 00:33 UTC proposal.adopted
- [553000](https://bounty.xe.network/log/553000) 2026-11-20 00:33 UTC ticket.facts area
- [552999](https://bounty.xe.network/log/552999) 2026-11-20 00:33 UTC proposal.adopted
- [552998](https://bounty.xe.network/log/552998) 2026-11-20 00:33 UTC ticket.facts
- [550051](https://bounty.xe.network/log/550051) 2026-11-20 00:26 UTC note.added

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

### Report

## Ringkasan

Kalau message tidak valid, broadcast bisa menyebabkan data loss.

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

Data loss kalau message tidak valid. Bisa menyebabkan data tidak sampai ke peer.

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