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

XE-13344 · Bounty

# \[net/gossip.go\] L8: gossipHandler() tidak handle message yang tidak valid — fault tolerance

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

- [559451](https://bounty.xe.network/log/559451) 2026-11-20 00:50 UTC reply.mirrored
- [558526](https://bounty.xe.network/log/558526) 2026-11-20 00:49 UTC reply.sent
- [554121](https://bounty.xe.network/log/554121) 2026-11-20 00:36 UTC github.state\_pushed
- [554120](https://bounty.xe.network/log/554120) 2026-11-20 00:36 UTC github.labels
- [553383](https://bounty.xe.network/log/553383) 2026-11-20 00:33 UTC proposal.adopted
- [553223](https://bounty.xe.network/log/553223) 2026-11-20 00:33 UTC proposal.adopted
- [553222](https://bounty.xe.network/log/553222) 2026-11-20 00:33 UTC ticket.status new → closed
- [552919](https://bounty.xe.network/log/552919) 2026-11-20 00:33 UTC proposal.adopted
- [552918](https://bounty.xe.network/log/552918) 2026-11-20 00:33 UTC ticket.facts area
- [552917](https://bounty.xe.network/log/552917) 2026-11-20 00:33 UTC proposal.adopted
- [552916](https://bounty.xe.network/log/552916) 2026-11-20 00:33 UTC ticket.facts
- [550270](https://bounty.xe.network/log/550270) 2026-11-20 00:28 UTC note.added

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

### Report

## Ringkasan

Kalau message tidak valid, handler bisa menyebabkan fault tolerance issues.

## Lokasi

- File: `net/gossip.go`
- Lines: 219-245

## Kode

```
func (g *Gossip) gossipHandler(stream network.Stream) {
    ...
    var msg GossipMessage
    if err := gob.NewDecoder(stream).Decode(&msg); err != nil {
        logging.Debugf("gossip: failed to decode message: %v", err)
        return
    }
    g.handleMessage(msg)
}
```

## Impact

Fault tolerance issues kalau message tidak valid. Bisa menyebabkan system tidak fault tolerant.

## Suggested Fix

```
func (g *Gossip) gossipHandler(stream network.Stream) {
    ...
    var msg GossipMessage
    if err := gob.NewDecoder(stream).Decode(&msg); err != nil {
        logging.Debugf("gossip: failed to decode message: %v", err)
        return
    }

    // validasi message sebelum handle
    if !g.isValidMessage(msg) {
        logging.Warnf("gossip: invalid message received")
        return
    }

    g.handleMessage(msg)
}

func (g *Gossip) isValidMessage(msg GossipMessage) bool {
    // validasi field yang wajib
    if msg.Key == "" {
        return false
    }
    if msg.Sender == "" {
        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-13344 and says what; it is read like any other.
