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

XE-13319 · Bounty

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

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

Told
:   2026-11-20 00:50 UTC

### Patches

None linked.

### History

- [559542](https://bounty.xe.network/log/559542) 2026-11-20 00:50 UTC reply.mirrored
- [558588](https://bounty.xe.network/log/558588) 2026-11-20 00:49 UTC reply.sent
- [554980](https://bounty.xe.network/log/554980) 2026-11-20 00:38 UTC github.state\_pushed
- [554974](https://bounty.xe.network/log/554974) 2026-11-20 00:38 UTC github.labels
- [553413](https://bounty.xe.network/log/553413) 2026-11-20 00:33 UTC proposal.adopted
- [553280](https://bounty.xe.network/log/553280) 2026-11-20 00:33 UTC proposal.adopted
- [553279](https://bounty.xe.network/log/553279) 2026-11-20 00:33 UTC ticket.status new → closed
- [553027](https://bounty.xe.network/log/553027) 2026-11-20 00:33 UTC proposal.adopted
- [553026](https://bounty.xe.network/log/553026) 2026-11-20 00:33 UTC ticket.facts area
- [553025](https://bounty.xe.network/log/553025) 2026-11-20 00:33 UTC proposal.adopted
- [553024](https://bounty.xe.network/log/553024) 2026-11-20 00:33 UTC ticket.facts
- [550018](https://bounty.xe.network/log/550018) 2026-11-20 00:26 UTC note.added

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

### Report

## Ringkasan

Kalau message tidak valid, handler bisa panic dan menyebabkan crash.

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

Crash kalau message tidak valid. Bisa menyebabkan service down.

## Suggested Fix

```
func (g *Gossip) gossipHandler(stream network.Stream) {
    ...
    defer func() {
        if r := recover(); r != nil {
            logging.Errorf("gossip: panic recovered: %v", r)
        }
    }()

    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)
}
```

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