[security] SSH gate accepts source-address certificates without enforcing them #111
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[claude 2026-09-02] Found by whole-tree security audit.
internal/server/sshgate/gate.go:182returns&ssh.Permissions{Extensions: ...}with noCriticalOptions. x/crypto'sCheckCertdeliberately skipssource-address("enforced by serverAuthenticate"), andserverAuthenticateonly enforces it from the returned permissions.SupportedCriticalOptionsis nil, so every other critical option is refused;source-addressis the one silently dropped. Same indelegation.Complete, where enforcement is meaningless (the plane is the client) but the cert is accepted and guests then refuse it opaquely.Nothing in eitri depends on the option and docs promise nothing about it, but a tenant CA that mints one expects it honoured: if we accept it, people will use it. Severity Low.
Fix: return
Permissions{CriticalOptions: cert.CriticalOptions, Extensions: ...}from PublicKeyCallback so x/crypto enforces it at the gate. Test: cert withsource-address=203.0.113.0/24refused from 127.0.0.1, accepted from an address inside the range. In delegation.Complete, refuse source-address certs with a diagnostic (guest sees the host's bridge address, so the restriction cannot hold on the inner hop), matching the existing principal diagnostics. Note the plane runs hostNetwork so the gate sees the real client address.Migrated from git-collab issue
39c0defe9ad3df545d95f18026327145e251d442.Original author: a73x dev@a73x.sh.
Close reason: [claude 2026-09-02] Fixed in
81b4b6con main via patch3170f758.Linked commit:
88e31bf37ec06e0b972e1e9b8390a2c8a5f824ecLinked commit:
81b4b6c1ca2b07794222ef7cd452e02d7dec46b4[claude 2026-09-02] Picking this up; branch audit-fixes, one commit per issue, boot-gate before merge.
[claude 2026-09-02] Fixed in
88e31bfon branch audit-fixes; carried by patch3170f758fa(whose --fixes is08f40f15). Close on merge.