Inside the Mailroom: The Decapsulation Decision, and the Match That Must Be Exact

Site Admin · 29 Nov 2026 · Network Hardware & NOS

The decapsulation decision must bind every packet to a tuple: source, destination, type, key, interface. An incomplete comparison is a hole in the mailroom wall — CWE-1023.

Parts 1–4 established the building, the tenants and the vendor. Now we go
behind the counter: how the decapsulation decision is actually made, what
fields it is supposed to compare, and why the code culture that built it
made an incomplete comparison inevitable.

The decision is a filter

Deep in the EOS forwarding path lives a piece of logic that answers one
question per packet: is this tunnel packet mine?

The honest way to write that logic is as a match against a tuple that
uniquely identifies a configured tunnel:

Every field in that tuple exists for a reason. The source says who is
allowed to talk. The destination says which endpoint of ours they are
talking to. The VNI or key says which tenant's mailroom the inner letter
belongs to. The interface says which counter the envelope was handed in
at. A switch that checks all five can safely open the envelope. A switch
that checks four cannot — because the attacker controls the fifth.

What "incomplete comparison" means

The advisory classifies the defect as CWE-1023: Incomplete Comparison
with Missing Factors.
That classification is the mechanism in one line:
the condition that decides "does this packet belong to my configured
decapsulation endpoint?" does not test every field it must test.

Nothing exotic, nothing mystical: a comparison was written, fields were
selected, and the set was incomplete. A correct implementation binds the
decapsulation decision to the full tuple; the affected implementation
binds it to a subset. When an attacker supplies values for the fields that
are checked, and varies the ones that are not, the switch has no way to
tell the envelope was never meant for this counter.

Why the design allowed it

Three compounding reasons, and they matter more than the specific missing
field:

"This is mine?" grew instead of being designed. The decapsulation
code grew incrementally — VXLAN first, then decap-groups, then GRE — and
each addition extended a comparison rather than replacing it with an exact
tuple match. Feature-additive codebases accumulate exactly this debt: the
reach of each new feature is "the existing check, plus one more clause",
until the check is a patchwork and the patchwork has holes.

The failure mode is silent by construction. The correct behaviour when
a tunnel packet matches nothing is "drop and count" — default-deny, with a
counter so an operator can see the attempts. The implemented behaviour on
the affected path is "decapsulate and forward". Default-deny would have
turned this bug into a dropped-packet counter. Default-allow turned it
into an isolation break. The design decision that made the bug quiet is
the same decision that made it dangerous.

The boundary is a filter, and filters are only as good as their last
clause.
Decapsulation is a trust decision — one of the oldest kinds of
code there is. And trust decisions implemented as filters fail in a
characteristic way: they fail open, they fail silently, and they fail
consistently across every packet the filter reaches.

The reframe that matters

The mechanism, stated plainly: a tunnel packet arrives that was never
meant for this switch's decapsulation path — different VNI, unexpected
source, or a tunnel type the operator did not configure here. The switch
compares what it compares. Because the comparison is incomplete, the
packet passes a test it should have failed. The outer header is stripped.
And the inner packet — attacker-chosen — is forwarded into the VRF or
decap-group that the matched configuration points at.

That is packet injection into a segment the attacker is not attached to,
using the switch itself as the injector. The switch does not merely
fail to drop the packet; it actively rewrites the packet's framing and
delivers it inside the trust boundary.

The next part goes a step back — the quiet failures that made this one
possible — and then Part 7 sits down with the flaw itself.

Next: Part 6 — the quiet failures first: tunnel configs that forward
what they should have dropped.