Skip to content

Bump aws-sdk-go-v2 for GHSA-xmrv-pmrh-hhx2: EventStream decoder panic terminates the mount #195

Closed

Description

@scttfrdmn

The release binary carries a MODERATE advisory. Surfaced by the trivy scan added in #191 — which only ran because the action pin was fixed in #194, so this is the first release scan in the project's history to actually produce output.

The advisory

GHSA-xmrv-pmrh-hhx2 — Denial of Service due to Panic in AWS SDK for Go v2 EventStream Decoder
CVSS 3.1: 5.9 / AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

An actor can send a malformed EventStream response frame containing a crafted header value type byte outside the valid range, which can cause the host process to terminate.

Fixed in the 2026-03-23 release and later.

What we ship

module go.mod fixed in
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.4 (go.mod:10) 1.97.3
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.1 (go.mod:28, indirect) 1.7.8

Confirmed by scanning a freshly built stripped linux/amd64 release binary:

trivy rootfs --format sarif --output t.sarif objectfs-linux-amd64
→ exit 0, 2 results, both GHSA-xmrv-pmrh-hhx2

Why this matters more here than the CVSS suggests

The impact metric is A:H — availability — and for a library that usually means one request fails. For a FUSE filesystem it means something worse: a panic on the S3 client goroutine terminates the mount process, which unmounts the filesystem out from under every open file descriptor. Any process holding a file gets ESTALE/EIO on its next syscall, and buffered writes that had not yet flushed are gone. This is the same failure shape as the shutdown panics fixed under M15/M16/M19 in v0.10.1, and it is why those were treated as data-integrity bugs rather than robustness bugs.

Reachability — real, but narrow

EventStream is used by SelectObjectContent, which this codebase does not call:

$ grep -rn "SelectObjectContent" --include="*.go" .    # no hits

The decoder is nonetheless linked into the binary (which is why trivy flags it), and reaching it requires an S3 endpoint that returns a malformed EventStream frame. Over TLS to real S3 that means AWS itself; the realistic exposure is a custom endpoint_url pointed at an untrusted or compromised S3-compatible service, which is a supported configuration.

So: not urgent, not theatrical either. Bump it.

Work

  • go get github.com/aws/aws-sdk-go-v2/service/[email protected] && go mod tidy
  • Confirm aws/protocol/eventstream resolves to ≥ v1.7.8
  • go build ./... && go test -race -count=1 ./... — 9 minor versions of service/s3 is enough surface to want the full suite, not -short
  • Re-run the substrate-backed suite in internal/testaws: it asserts on wire-level behavior (headers, ranges, byte counts), so an SDK bump is exactly the change that could shift it
  • AWS_PROFILE=aws AWS_REGION=us-west-2 go test -race -tags=integration ./...
  • Re-scan the built binary and confirm trivy reports zero results
  • Check whether the bump moves smithy-go — the pricing work already noted that service/pricing forces smithy-go ≥ 1.26.0 against the pinned v1.24.0, and these two bumps may collide

Follow-up, separately

Once this is clear, security-scan in release.yml should become a real gate: exit-code: 1 with an explicit severity floor. It is deliberately non-blocking today (release.yml documents why) because gating on an untriaged scan would have blocked v0.10.1 on this bump.

Activity

  1. added
    type: security
    priority: high
    area: s3
    on Aug 2, 2026
  2. added a commit that references this issue on Aug 2, 2026
    24e5bb3
  3. scttfrdmn commented on Aug 2, 2026

    @scttfrdmn
    OwnerAuthor

    Fixed in 24e5bb3 on #194, rather than deferred — the alternative was releasing v0.10.1 with a known advisory and a scan deliberately configured not to fail on it.

    The collision this issue anticipated did not happen. smithy-go moved only v1.24.0 → v1.24.2, not to the v1.26.0 the pricing work needs, so this bump and that one do not conflict.

    What moved

    aws-sdk-go-v2/service/s3                v1.88.4 → v1.97.3
    aws-sdk-go-v2/aws/protocol/eventstream  v1.7.1  → v1.7.8
    aws-sdk-go-v2                           v1.41.0 → v1.41.5
    smithy-go                               v1.24.0 → v1.24.2
    

    A second, larger finding came out of the same scan

    19 of the 20 vulnerabilities were not the SDK — they were the Go standard library, because go.mod carried only go 1.26.0 and actions/setup-go with go-version-file: go.mod reads that as an exact version spec:

    Setup go version spec 1.26.0
    go version go1.26.0 linux/amd64
    

    Every job in every workflow, including the four that build release binaries, compiled with go1.26.0 while go1.26.5 was current. crypto/tls (fixed 1.26.5), crypto/x509 (1.26.2/1.26.4, six advisories), net/http and net/http/httputil (1.26.3), plus net, net/textproto, html/template, archive/tar. The first two are on the path to S3 on every request.

    Fixed with an explicit toolchain go1.26.5. setup-go prefers toolchain over go when both are present, which leaves the go line meaning what it should — the language minimum, not a build pin. One directive doing two jobs, and the wrong one winning, was the actual defect.

    Verification

    Nine minor versions of service/s3 warranted more than a green build:

    • go test -race -count=1 ./... — full suite, not -short: zero failures
    • internal/testaws and internal/difftest included, which is the part that mattered — they assert on headers sent, ranges requested, and bytes transferred, so an SDK bump is exactly the change that could move them
    • AWS_PROFILE=aws AWS_REGION=us-west-2 go test -race -tags=integration ./internal/storage/s3/... against real S3: ok
    • coverage-gate: all 30 packages at or above their floor
    • gofmt clean · go vet clean · golangci-lint --new-from-merge-base 0 issues
    • govulncheck: 20 → 0 vulnerabilities

    The follow-up in the last section of this issue still stands and is now unblocked: with the scan clean, security-scan in release.yml can become a real gate (exit-code: 1 with an explicit severity floor) instead of annotating. Filing that separately.

  4. added a commit that references this issue on Aug 2, 2026
    4be2327
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: s3priority: hightype: security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions