The Parser That Panics

Site Admin · 29 Nov 2026 · Routing & Protocols

#3308 shifted an index. #3252 and GO-2025-3630 found other edges. #2846 and #1652 were the non-panic background. Read as a ladder, the panics share one shape: an input the parser did not model, a validation result at a layer boundary, and code that assumed the result could not be negative.

Before a malformed UPDATE becomes a CVE, it is a series of smaller surprises:
an index that shifted, a length nobody expected, a capability parsed as zero.
This part walks the ladder — and shows why fuzzing kept finding rungs.

The ladder

The corpus records a cluster of issues in the same parser, found over years.
Each is a different edge; the failure pattern repeats.

#3308 — the index that shifted

A fuzzer found a reproducible index out of range panic on a crafted UPDATE
(February 2026, reported against 4.2.0). The trigger is precise:

The reporter's analysis was exact: the deletion invalidates the stored
position. RFC 4271 says attributes should be ordered by type, not that they
must be; a peer is allowed to send them in another order. The parser had
assumed the common order.

Fixed in commit 9fe96a9b on 17 February 2026, shipped in 4.3.0 on 28
February. No CVE was issued. That matters for part 8.

CVE-2026-41642 — the nil body

A malformed UPDATE carries an unrecognised attribute whose flags mark it
Well-known (Optional bit clear): for example type 0xEE or 0xFF with
flags 0x40. The parsing layer identifies the error — correctly. The FSM loop
does not stop. It proceeds to the body of a message that was deemed invalid,
and the body pointer is nil:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation ...]
pkg/server/fsm.go:1826

This is part 7's subject. It is the same error-strategy failure as #3308, one
layer up: a validation result that does not stop execution.

#3252 — gobgp 4.0.0 panic

The corpus lists a 4.0.0 panic without a full mechanism in the material it
reviewed. The issue is now closed (October 2026). It is another instance, not
another class.

GO-2025-3630 — the zero-length capability

Go's vulnerability database records a panic when an OPEN message carries a
zero softwareVersionLen capability. The fix landed in an earlier release line.
Again: a length the parser did not expect, and a failure path that ended the
process.

#2846 and #1652 — the non-panic failures

Not every defect on the ladder is a crash. #2846 records GoBGP rejecting routes
when a peer AS and confederation sub-AS are the same — a logic/availability bug,
now closed. #1652 records Cisco interoperability problems from 2020, closed the
same year. They show the normal background noise of a BGP implementation
meeting the real world.

What the ladder shows

Read as a set, the panic issues have a shape:

  1. An input edge the parser did not model.
  2. A validation result — or a missing one — at a layer boundary.
  3. A code path that assumes the validation result cannot be negative.
  4. Go's default failure mode: the process exits, taking every session with it.

Fixing one instance removes one edge. The class remains: malformed input is
treated as a programming error rather than a protocol event.
That is why
fuzzing kept producing rungs, and why the fix that matters is a change of
contract — errors returned all the way out, and a recover() at the message
loop so that even an unanticipated panic costs one message, not the daemon.

The status, checked

The corpus's snapshot said the open items had no fix. Verified against upstream
on 30 November 2026:

The ladder was climbed, rung by rung. The next rung is the fundamental one.

Next: Part 7 — the first and most fundamental flaw: CVE-2026-41642, and the
contract a network daemon owes its peers.