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

XE-13317 · Bounty

# \[net/gossip.go\] C1: broadcast() tidak handle message yang tidak valid — memory exhaustion

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

Told
:   2026-11-20 00:49 UTC

### Patches

None linked.

### History

- [559431](https://bounty.xe.network/log/559431) 2026-11-20 00:50 UTC reply.mirrored
- [558487](https://bounty.xe.network/log/558487) 2026-11-20 00:49 UTC reply.sent
- [554226](https://bounty.xe.network/log/554226) 2026-11-20 00:37 UTC github.state\_pushed
- [554222](https://bounty.xe.network/log/554222) 2026-11-20 00:37 UTC github.labels
- [553366](https://bounty.xe.network/log/553366) 2026-11-20 00:33 UTC proposal.adopted
- [553184](https://bounty.xe.network/log/553184) 2026-11-20 00:33 UTC proposal.adopted
- [553183](https://bounty.xe.network/log/553183) 2026-11-20 00:33 UTC ticket.status new → closed
- [552839](https://bounty.xe.network/log/552839) 2026-11-20 00:33 UTC proposal.adopted
- [552838](https://bounty.xe.network/log/552838) 2026-11-20 00:33 UTC ticket.facts area
- [552836](https://bounty.xe.network/log/552836) 2026-11-20 00:33 UTC proposal.adopted
- [552835](https://bounty.xe.network/log/552835) 2026-11-20 00:33 UTC ticket.facts
- [550423](https://bounty.xe.network/log/550423) 2026-11-20 00:29 UTC note.added

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

### Report

## Ringkasan

Kalau message terlalu besar atau tidak valid, broadcast bisa menyebabkan memory exhaustion.

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

Memory exhaustion kalau message terlalu besar. Bisa menyebabkan OOM.

## Suggested Fix

```
const maxMessageSize = 10 * 1024 * 1024  // 10 MB

func (g *Gossip) broadcast(key string, msg []byte, mode GossipMode) {
    ...
    if len(msg) > maxMessageSize {
        logging.Warnf("gossip: message too large (%d bytes)", len(msg))
        return
    }

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