Denial of service from an established SSH channel deadlock (GO-2026-6355)

Crafted messages on an established SSH channel can deadlock the connection

Description

In versions of golang.org/x/crypto before v0.56.0, a malicious peer can send crafted messages on an established SSH channel and deadlock the entire connection. The fixed version explicitly handles channel messages and global requests. It treats other invalid messages as protocol errors and closes the connection.

Potential impact

Communication over the SSH connection and tasks that depend on it may stop. A deadlocked connection can also retain resources and affect service availability.

Remediation

Update golang.org/x/crypto to v0.56.0 or later, then rebuild and deploy. Review application error handling so it cleans up connections closed because of errors and establishes new connections when needed.

Examples

The following examples show a dependency declaration in go.mod.

Before

go
require golang.org/x/crypto v0.54.0

After

go
require golang.org/x/crypto v0.56.0

Replace the deployed binary as well as updating the dependency files.

References