The Wire · Showcase
GO CRYPTO PATCHES SOURCE-ADDRESS VALIDATION BYPASS IN SSH
By RepoJournal · Filed · About Go
CVE-2026-46595 closed a critical gap where SSH source-address restrictions weren't enforced consistently across all authentication methods.
The golang/crypto team shipped a fix [1] that extends source-address validation to all authentication callbacks, not just PublicKeyCallback. Previously, VerifiedPublicKeyCallback could return Permissions with CriticalOptions that bypassed the documented enforcement contract. The patch consolidates the check to a single point at the end of each authentication attempt, catching escapes from any auth path. Alongside the security fix, the team hardened the SSH implementation against race conditions [2] in test helpers, corrected channel initialization ordering [3] that could expose zero-valued fields to concurrent goroutines, and made channel.close idempotent [4] using sync.Once to prevent future panics. One thing to note: source-address options are IP-based and will never match non-IP transports like Unix domain sockets [5], a behavior now documented and tested.
Action items
- → Update golang.org/x/crypto to the latest commit and rebuild SSH-dependent services golang/crypto [immediate]
- → Review any custom SSH authentication callbacks that rely on Permissions.CriticalOptions golang/crypto [plan]
- → Test SSH source-address restrictions across all auth method paths in your application golang/crypto [plan]
References
- [1] ssh: enforce the source-address critical option for all auth callbacks golang/crypto
- [2] ssh: fix data race in the doClientServerAuth test helper golang/crypto
- [3] ssh: initialize new channels fully before adding them to chanList golang/crypto
- [4] ssh: make channel.close idempotent golang/crypto
- [5] ssh: document and test source-address behavior for non-IP transports golang/crypto