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

XE-13343 · Bounty

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

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

- [559452](https://bounty.xe.network/log/559452) 2026-11-20 00:50 UTC reply.mirrored
- [558529](https://bounty.xe.network/log/558529) 2026-11-20 00:49 UTC reply.sent
- [554954](https://bounty.xe.network/log/554954) 2026-11-20 00:38 UTC github.state\_pushed
- [554949](https://bounty.xe.network/log/554949) 2026-11-20 00:38 UTC github.labels
- [553384](https://bounty.xe.network/log/553384) 2026-11-20 00:33 UTC proposal.adopted
- [553225](https://bounty.xe.network/log/553225) 2026-11-20 00:33 UTC proposal.adopted
- [553224](https://bounty.xe.network/log/553224) 2026-11-20 00:33 UTC ticket.status new → closed
- [552923](https://bounty.xe.network/log/552923) 2026-11-20 00:33 UTC proposal.adopted
- [552922](https://bounty.xe.network/log/552922) 2026-11-20 00:33 UTC ticket.facts area
- [552921](https://bounty.xe.network/log/552921) 2026-11-20 00:33 UTC proposal.adopted
- [552920](https://bounty.xe.network/log/552920) 2026-11-20 00:33 UTC ticket.facts
- [550264](https://bounty.xe.network/log/550264) 2026-11-20 00:28 UTC note.added

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

### Report

## Ringkasan

Kalau message tidak valid, broadcast bisa menyebabkan robustness issues.

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

Robustness issues kalau message tidak valid. Bisa menyebabkan code tidak robust.

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