$ the-wire · showcase
SSH WINDOW CREDIT BUG COULD STALL CHANNELS; COMPILER REFACTORING SPLITS SSA PACKAGE
By RepoJournal · Filed · About Go · Composed from the cited sources · methodology
Go's SSH implementation leaks window credits on discarded extended data, potentially freezing channels, while the compiler team restructures its core SSA package to improve modularity.
The SSH window credit bug [1] is the critical fix: handleData subtracts packet lengths from the receive window but silently discards extended data with unknown type codes without returning credits, allowing a peer to permanently shrink the channel window down to a complete stall. Applications using golang.org/x/crypto/ssh for channel operations should review affected code paths. On the compiler front, Michael Matloob landed two foundational changes [2] [3] preparing to split ssa.Compile into a separate package (issue golang/go#80409), removing the Func type's dependency on HTMLWriter and adding test helpers that run SSA passes without full compilation. Poly1305 assembly optimization for RISC-V64 [4] delivers 26-48% speedups across key sizes, with the 2M benchmark dropping from 3.6ms to 1.9ms. Cleanup work across the standard library continues: net/rpc removed obsolete sort.Interface methods [5] after switching to slices.SortFunc, and bytes/strings dropped redundant DecodeRune fast paths [6] that became redundant when utf8.DecodeRune itself became inlineable. Runtime stack frame pointer handling around injected calls [7] has been corrected to prevent corruption during asynchronous preemption and sigpanic scenarios.
Action items
- → Review SSH channel usage if you receive extended data with non-standard type codes golang/crypto [plan]
- → Monitor golang/go#80409 for SSA package split timeline and API changes golang/go [monitor]
- → Update to RISC-V64 builds with Poly1305 assembly for crypto performance gains golang/crypto [plan]
- → Check golang/tools for present security flag updates if running local code golang/tools [monitor]
References
- [1] ssh: return window credit for discarded extended data ↗ golang/crypto
- [2] cmd/compile/internal/ssa: remove HTMLWriter from Func ↗ golang/go
- [3] cmd/compile/internal/ssa: remove test dependence on Compile ↗ golang/go
- [4] crypto/internal/poly1305: provide optimised assembly for riscv64 ↗ golang/crypto
- [5] net/rpc: remove unused sort.Interface methods ↗ golang/go
- [6] bytes, strings: remove redundant DecodeRune fast paths ↗ golang/go
- [7] runtime: fix frame pointer adjustment around injected calls ↗ golang/go
- [8] cmd/present: fix obsolete flag in security warning ↗ golang/tools