<!-- XE-13318 · [net/gossip.go] C2: handleMessage() tidak handle concurrent message processing — data corruption · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13318>. The page is the record; this is the same page for reading.*

XE-13318 · Bounty

# \[net/gossip.go\] C2: handleMessage() tidak handle concurrent message processing — data corruption

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

- [559430](https://bounty.xe.network/log/559430) 2026-11-20 00:50 UTC reply.mirrored
- [558485](https://bounty.xe.network/log/558485) 2026-11-20 00:49 UTC reply.sent
- [554911](https://bounty.xe.network/log/554911) 2026-11-20 00:37 UTC github.state\_pushed
- [554906](https://bounty.xe.network/log/554906) 2026-11-20 00:37 UTC github.labels
- [553365](https://bounty.xe.network/log/553365) 2026-11-20 00:33 UTC proposal.adopted
- [553182](https://bounty.xe.network/log/553182) 2026-11-20 00:33 UTC proposal.adopted
- [553181](https://bounty.xe.network/log/553181) 2026-11-20 00:33 UTC ticket.status new → closed
- [552834](https://bounty.xe.network/log/552834) 2026-11-20 00:33 UTC proposal.adopted
- [552833](https://bounty.xe.network/log/552833) 2026-11-20 00:33 UTC ticket.facts area
- [552832](https://bounty.xe.network/log/552832) 2026-11-20 00:33 UTC proposal.adopted
- [552831](https://bounty.xe.network/log/552831) 2026-11-20 00:33 UTC ticket.facts
- [550428](https://bounty.xe.network/log/550428) 2026-11-20 00:29 UTC note.added

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

### Report

## Ringkasan

Kalau multiple handler dijalankan bersamaan dan modify shared state, bisa terjadi data corruption.

## Lokasi

- File: `net/gossip.go`
- Lines: 246-280

## Kode

```
func (g *Gossip) handleMessage(msg GossipMessage) {
    ...
    switch msg.Type {
    case GossipMessageTypeSync:
        g.handleSyncMessage(msg)
    case GossipMessageTypeAnnounce:
        g.handleAnnounceMessage(msg)
    }
}
```

## Impact

Data corruption kalau multiple handler modify shared state bersamaan.

## Suggested Fix

```
func (g *Gossip) handleMessage(msg GossipMessage) {
    ...
    g.mu.Lock()
    defer g.mu.Unlock()

    switch msg.Type {
    case GossipMessageTypeSync:
        g.handleSyncMessage(msg)
    case GossipMessageTypeAnnounce:
        g.handleAnnounceMessage(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-13318 and says what; it is read like any other.
