Skip to content

Edge pod attachments: unchecked caller inputs and weak isolation tests #989

Open

Description

@ecv

Parent: #970

Deliverable

A current-path disposition for every finding in this issue and its comments, recorded in rows A01–A16 of the MASQUE acceptance matrix. Each row gets either a fixing revision with its regression check, or evidence that MASQUE does not use that path.

The findings came from the pre-integration edge packages (#945, #946, #947, #949, #950, #951, #952). Those packages are now wired in through #975–#984, so a finding is settled only by evidence against the current path, not by the merge of a replacement. The detail stays in the comments below.

Work items

Dependencies

None to start. Rows close independently: each fixing PR or evidence PR records its own row in the acceptance matrix. Only A09–A10 (cleanup assertions, timeouts and a recorded real-node run) wait on #985's harness. The containerlab evidence for A05, A06, A08, A14 and A16 comes from task verify:masque-conformance (#974).

Acceptance

  • Every row A01–A16 in the acceptance matrix links a fixing revision and passing check, or an executed non-applicability result. No row is satisfied by an issue or PR's closed state alone.
  • Negative rows (A05, A07, A08) show the denied packet absent at the destination, with a positive control in the same capture.
  • The PR that settles the last open row closes this issue with Fixes #989.

Activity

  1. ecv commented on Oct 22, 2026

    @ecv
    ContributorAuthor

    Detail by source PR:

    #947, admission

    • Admit takes grants and req.VPC from the caller and binds neither to a tenant identity. An empty req.VPC or provider is not rejected, so a grant with an empty VPC matches. Reject both in validate, and document the caller contract.
    • A request with no prefixes skips the prefix check. Say so, or require at least one prefix.
    • Core may set any non-Ready condition type. Use a closed list.

    #950, datapath

    • Attachment.MTU must be at least 1280 and has no upper bound against the encapsulated underlay. Readback now reports MTU drift, so attachments made by a feat(edge): Attach socket and packet consumer pods to a VPC from the host #949 build will read as drifted.
    • datapath_test.go shows identical addresses answering with different identities but never sends a packet that must not arrive, such as an address registered only in VPC B to VPC A's SID. Add one negative per direction.
    • TUN attachments register as attachreg.InterfaceTypeVeth. Confirm that matches what the CNI registers for a packet consumer.

    #951, policy

    • Policy is bound only on VPC A's attachments. Add a VPC B dial that must fail while A's policy allows.
    • The ICMP denial case has no deny-counter assertion.

    #952, real-node test

    • attachedPrograms treats a FilterList error as no programs, and the control checkCNIProgramsVisible runs only when GALACTIC_EDGE_TARGET_BPF_CNI is set, so the CNI negative can pass vacuously.
    • Cleanup errors are discarded and nothing asserts the VRF, table 0x7EDC0001 and edgefx-* links are gone from the live node.
    • TestTargetConsumer sleeps 10 minutes by default, equal to go test's default timeout.
    • No run on a real node is recorded on the PR.
  2. added
    tech-debt
    on Oct 22, 2026
  3. ecv commented on Oct 22, 2026

    @ecv
    ContributorAuthor

    From #945 at 762314d and #946 at eb52c8f (both approved once their blockers were fixed):

    • Writer uniqueness, state-directory lifetime and the missing deadline on mutate and Fence are documented but not enforced. The wiring PR has to honor them.
    • claim.Instance holds one mutex across store calls, so a slow Acquire or Release on one key delays Renew on another and can let that lease lapse. Document one instance per key, or drop the lock around store I/O.
    • The claim package has no production Duration, MaxDrift or Margin yet, and its safety depends on the store never reusing versions. Check both when the store adapter lands.
  4. ecv commented on Oct 22, 2026

    @ecv
    ContributorAuthor

    From #949 at 217bc0c (approved once its blockers were fixed):

    • verifyPair compares hostLink.NetNsID with the pod's namespace ID, but netlink reports 0 when IFLA_LINK_NETNSID is absent, which is the case for a same-namespace peer. A pod namespace that was assigned ID 0 therefore matches a host link whose peer is in the host namespace. The reciprocal index check has to line up as well, so this is contrived. Treat the ID as meaningful only when the attribute is present.
    • TestPeerNamespaceOwnership passes even without the namespace check, because its impostor already fails the index check. Add a case where only the namespace differs.
    • A failed re-provision downs a live attachment, so a failed drift repair takes it offline.
    • The renamed recovery test no longer checks traffic after recovery.
    • Extra routes through the pod link are neither pruned nor reported.

    Still open after the #950 to #952 rewrite: isolation negatives per direction (counters are compared only after both pings), TUN registration as veth, the VPC B policy case, the ICMP counter, the opt-in CNI control, cleanup assertions, the 10-minute sleep, and a recorded real-node run.

  5. privateip commented on Oct 27, 2026

    @privateip
    Contributor

    Dispositions for the findings #974 owns, from docs/designs/masque/acceptance.md:

    • A05, per-direction negatives: the MASQUE lab rows send to an address only in the other VPC in each direction, with a positive control on every capture. Covered by test(edge): Prove MASQUE packet access in the lab #1140.
    • A06, TUN registered as veth: the attachment's host link is the host end of a veth, and the TUN sits behind its peer in the pod VRF. So the link is registered for delivery as a veth (bpf_redirect_peer), and the lab row reads that registration back from the pinned map for both tenants. Both directions pass through it.
    • A08, vacuous pass: every capture must first see its own tenant's traffic before its negatives count.
    • A14, NetNsID: the check already treats an absent peer-namespace attribute as -1, which matches no namespace. A new real-kernel test offers an impostor whose names and indexes all match and whose peer namespace alone differs. Provision and Release refuse it and change nothing. The test fails with the check removed.
    • A16, extra routes on the pod link: this was a real gap, and fix(edge): Remove stray IPv6 routes and addresses on Edge attachments #1169 fixes it. The node now removes any unicast route through an attachment's host link, pod link or packet device that it did not install, matching destination, gateway and metric. It exempts kernel routes only when they are the connected route for one of the link's addresses. Readback reports any that remain. A lab row adds such a route with a client connected, and the node removes it at its next pass with no lost replies.
  6. added theissue type on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debt

    Type

    Fields

    Priority

    Low

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions