[Low] Gossip validators accept + relay blocks/votes with unknown JSON fields that every subscriber silently drops
Report
Summary
Gossip validators decode Block/Vote messages with plain json.Unmarshal (unknown fields ignored), while the Subscribe paths decode with DisallowUnknownFields(). A valid block/vote (correct hash, valid signature/PoW) carrying one extra JSON field is therefore accepted and relayed by every node but processed by none — silent relay-without-processing, plus mesh bandwidth waste and a forward-compatibility trap.
Root Cause
blockValidator(net/gossip_validate.go:63-66) andvoteValidator(:106-109) decode with plainjson.Unmarshal(msg.Data, &bm)/&vm— unknown fields are ignored, so a tainted-but-valid message passes validation and is relayed.- The Block
Subscribepath (net/gossip.go:139-141) and VoteSubscribepath (:209-211) decode withdec.DisallowUnknownFields()— the same message fails decoding and is silently dropped (continueafter a warn log). - The other four topics (statechain, marketplace, directory, certificate) use plain unmarshal on both sides (
net/gossip.go:348, 444, 502) and are unaffected — only Block/Vote diverge.
Impact
- Silent relay-without-processing: a tainted block/vote propagates mesh-wide, consuming relay bandwidth (up to
MaxGossipMessageSize = 262144bytes/message,net/gossip.go:27, × fanout) while contributing nothing, and earning the sender peer-score for messages no one processes. - Vote suppression (weak angle): a relay can append a junk field to someone else's vote without invalidating its signature (the signature covers the signing bytes, not the JSON envelope). Exploiting this for suppression needs eclipse-level positioning, so this angle is weak.
- Forward-compatibility trap (strongest angle): any future protocol extension that adds a field to Block/Vote JSON would silently break gossip ingestion network-wide — old nodes would relay the new messages but drop them on subscribe — instead of failing cleanly at validation.
Severity Low: no crash, corruption, or fund loss.
Verification
Executed in-package test (valid block/vote with one extra field injected textually — a map[string]any round-trip would corrupt int64 timestamps and break the hash/signature):
tainted: validator=Accept, strict decode error=json: unknown field "future_extension_field"
Logged for both the block and the vote case; plain (untainted) controls are accepted by both paths.
Note on related reports
Searched "DisallowUnknownFields" (0 hits) and "gossip validator unknown fields" (0 hits). #552/#394 report the same symptom (validator Accepts, Subscribe silently drops) but a different mechanism — the len(b.Signature) != 128 check dropping multisig blocks — not the decode-strictness divergence reported here.
Suggested fix
Match decode strictness on both sides: add DisallowUnknownFields() to the validators (fail tainted messages at validation, with peer-score consequences), or drop it from the subscribers.
Thread
Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the first verifiable submission, so this one closes as a duplicate. If you believe it is a different bug, file a new report that links https://bounty.xe.network/XE-16942 and says what differs; it is read like any other.