Skip to content

chore(deps): bump x/crypto and grpc for the SSH deadlock and DATA frame advisories - #7024

Merged
otavio merged 2 commits into
masterfrom
chore/bump-x-crypto-0.56
Sep 2, 2026
Merged

chore(deps): bump x/crypto and grpc for the SSH deadlock and DATA frame advisories#7024
otavio merged 2 commits into
masterfrom
chore/bump-x-crypto-0.56

Conversation

@otavio

@otavio otavio commented Sep 2, 2026

Copy link
Copy Markdown
Member

What

Moves golang.org/x/crypto to v0.56.0 across all five modules and google.golang.org/grpc to
1.83.1 in tests/, clearing three advisories. No behaviour change beyond the upstream fixes.

Why

GO-2026-6354 and GO-2026-6355 both let a peer deadlock an SSH connection through the channel
mux. govulncheck reports them as reachable here through ssh.NewServerConn and
channel.handlePacket, so the SSH listener is exposed to an unauthenticated peer, and through
ssh.Dial/ssh.NewClientConn on the agent side. These are code scanning alerts 304 and 305.

GHSA-vp52-pcj8-j9qc (high) is heap exhaustion from unbounded fragmented HTTP/2 DATA frames.
gateway/ already moved in "deps: bump google.golang.org/grpc from 1.82.1 to 1.83.1 in /gateway",
which left tests/ as the last module behind. This is Dependabot alert 685.

Changes

  • x/crypto v0.55.0 → v0.56.0 in root, agent/, server/, tests/ and gateway/. All five
    carry the dependency, so they move together rather than leaving the listener and the agent on
    different versions of the channel mux.
  • grpc 1.82.1 → 1.83.1 in tests/. Reached only through testcontainers, so nothing shipped is
    affected — this closes the alert rather than a hole.

Testing

govulncheck after the bump reports 0 vulnerabilities for root, server/ and gateway/;
GO-2026-6354/6355 are gone from every module. Full test suites pass across root, server/,
agent/ and gateway/, plus go vet -tags docker on tests/.

Two environment notes for anyone reproducing locally, both of which look like real failures but
are not:

  • testcontainers needs --network host, otherwise the Ryuk reaper is unreachable at
    172.17.0.1 from a nested container and pkg/worker/asynq stalls 60s then fails.
  • shellhub-server-1 bakes the root go.mod into the image while bind-mounting go.sum, so
    root-module builds there report spurious "missing go.sum entry" errors. Use a
    workspace-mounted one-off container.

GO-2026-4883/4887 still show on agent/ and tests/. Those are the known docker/docker
pair with no fix on that module path, unaffected by this PR.

…deadlocks

GO-2026-6354 and GO-2026-6355 both let a peer deadlock an SSH connection through the channel
mux, and both are fixed in v0.56.0.

In GO-2026-6354 a channel registered in the mux's chanList is not usable until it is
established, but handlePacket still delivers to it: flooding the channel's incomingRequests
before the open confirmation blocks the mux loop and takes the whole connection with it. The fix
adds an atomic established state and drops every packet other than the open confirmation or
failure until it is set.

In GO-2026-6355 the same loop buffers and blocks on messages outside RFC 4254 once the channel
is established. The fix handles the RFC's channel messages, treats global requests explicitly,
and tears the connection down on anything else instead of blocking.

govulncheck reports both as reachable here through ssh.NewServerConn and channel.handlePacket,
so the SSH listener is exposed to an unauthenticated peer, and through ssh.Dial and
ssh.NewClientConn on the agent side.

Every module in the workspace carries the dependency, so all five move together rather than
leaving the listener and the agent on different versions of the mux.
GHSA-vp52-pcj8-j9qc: a gRPC-Go server accumulates fragmented HTTP/2 DATA frames without
bounding what a single stream may hold, so a peer sending many small fragments can exhaust the
heap. Fixed in 1.83.1; the tests module was still on 1.82.1.

The gateway already moved in "deps: bump google.golang.org/grpc from 1.82.1 to 1.83.1 in
/gateway", which left this module as the last one behind. It reaches grpc only through
testcontainers, so nothing shipped is affected -- this closes the alert rather than a hole.
@otavio
otavio requested review from a team as code owners September 2, 2026 21:53
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Claude finished @otavio's task in 57s —— View job


Code Review Complete

Reviewed 10 files across code quality, security, testing, language patterns, and architecture — no new issues found. The code looks good as-is.

This is a clean, source-code-free dependency bump. Verified:

  • Version consistency — every shellhub module that carries golang.org/x/crypto (root, agent/, server/, tests/, gateway/) is now on v0.56.0; google.golang.org/grpc is v1.83.1 in the two modules that carry it (tests/, gateway/). No module left straddling versions of the SSH channel mux.
  • Checksum integrity — the go.sum h1: and /go.mod hashes for v0.56.0 and grpc v1.83.1 are byte-identical across all modules, as expected for a legitimate bump.
  • Scope — only go.mod/go.sum changed; the advisory fixes (GO-2026-6354/6355, GHSA-vp52-pcj8-j9qc) are upstream, so there's no behavioural surface to review here.

One out-of-scope note: cloud/go.mod still pins golang.org/x/crypto v0.55.0 (indirect) — that's a separate repo and would need its own bump to fully close the advisory across the enterprise build.

To request another review round, comment /review.

--- • chore/bump-x-crypto-0.56

@otavio
otavio enabled auto-merge (rebase) September 2, 2026 21:54
@otavio
otavio merged commit a91a5eb into master Sep 2, 2026
47 checks passed
@otavio
otavio deleted the chore/bump-x-crypto-0.56 branch September 2, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant