Skip to content

v0.6.3: Security release, host escape and path traversal

Choose a tag to compare

@sumansaurabh sumansaurabh released this 02 Oct 15:43
· 3082 commits to main since this release
ff4e50d

Features in v0.6.3

Security release. The issues below were found in a review of the sandbox control plane. No configuration change is required to pick up the fixes.

Highlights

  • Mount sources can no longer run a command on the host. An option-shaped external-storage mount source was parsed as a flag by the host mount tool and could run as the daemon user (GHSA-5pqm-4fh4-585q). Those sources are now rejected.
  • WASM toolhost no longer executes on the host. /process/exec/stream and /process/code-run spawned a host shell or interpreter. Both fail closed with 501. POST /process/execute still runs inside the WASM engine.
  • Path checks on sandbox IDs, bundle digests, and WASM module refs. A .. id, digest, or relative module ref can no longer escape its directory.
  • Signed releases. Each release publishes an SLSA provenance asset. Go fuzz targets cover the untrusted-input validators.

Security

  • Mount source (critical, GHSA-5pqm-4fh4-585q). Mount sources are rejected when they are option-shaped or contain control characters. Every mount adapter ends its options with -- before the source and target.
  • Sandbox ID (high, #532). A caller-influenced id, including one carried on the cluster create-forward header, was used as a host path. Ids are now checked ([A-Za-z0-9_-]{1,128}) at create and again at use.
  • WASM toolhost (critical, #534). The two host-backed routes are removed. Restoring a confined streaming or code-run path is left for a later release.
  • js-bundle digests (high, #540). A digest is accepted only when it is 64 hex characters, before any filesystem access.
  • WASM module refs (high, #542). A relative ref is confined to the modules directory. Absolute paths stay the operator escape hatch.
  • containerd build contexts (#549). Extraction stops at 100,000 entries and 2 GiB of regular-file bytes, so a context tar cannot fill the disk.
  • Rust anyhow, h2, and rustls are past the published advisories. Vulnerable copies bundled in the pinned npm CLI are replaced. The uncalled x/crypto openpgp advisory is ignored on purpose.

Supply chain (#531, #545, #546, #550)

  • OpenSSF Scorecard workflow and badge. SECURITY.md is the disclosure policy.
  • SLSA build provenance is a release asset.
  • Workflow pip and npm installs are pinned by hash.
  • Native fuzz targets run on the untrusted-input validators.
  • CodeQL findings from this pass are cleared. The Codacy scan is removed.

Fixes

  • SSHFS mounts (#529). The adapter used -o foreground, which sshfs 3.x rejects, so those mounts never came up. It now uses -f. The same change adds the integration tests that refuse an option-shaped mount source.
  • macOS install. install.sh no longer exits silently while detecting PUBLIC_HOST. (#527)
  • TypeScript SDK publish uses npm OIDC. (#528)

Upgrade notes

  • WASM /process/exec/stream and /process/code-run return 501.
  • Sandbox ids outside [A-Za-z0-9_-]{1,128} are rejected at create.

What's Changed

  • fix(install): don't exit silently on macOS at PUBLIC_HOST detection by @sumansaurabh in #527
  • fix(ci): publish the TypeScript SDK with npm OIDC by @sumansaurabh in #528
  • fix(mounts): sshfs foreground flag + UC-174/175 mount-source integration tests by @sumansaurabh in #529
  • chore(security): OpenSSF Scorecard badge, drop report binary by @sumansaurabh in #531
  • chore(deps): bump dompurify from 3.4.15 to 3.4.16 in /docs by @dependabot[bot] in #530
  • fix(service): validate sandbox ID before it is used as a host path by @sumansaurabh in #532
  • feat: Codacy schedule cron time by @sumansaurabh in #533
  • fix(wasm): disable host-backed exec + code-run in the toolhost (sandbox escape) by @sumansaurabh in #534
  • fix(ci): give Codacy SARIF runs a unique code-scanning category by @sumansaurabh in #536
  • fix(ci): write categorized Codacy SARIF to a new file by @sumansaurabh in #538
  • chore(security): resolve low-severity CodeQL findings by @sumansaurabh in #539
  • fix(jsbundle): validate content-address digest before using it as a path by @sumansaurabh in #540
  • fix(ci): let the merge queue run the required changes check by @sumansaurabh in #541
  • fix(sdk): bump anyhow, h2, and rustls past published advisories by @sumansaurabh in #543
  • fix(wasmmod): reject "../" traversal in relative module refs by @sumansaurabh in #542
  • chore(ci): remove the Codacy security scan by @sumansaurabh in #544
  • test(fuzz): add fuzz targets on untrusted-input validators (Scorecard Fuzzing) by @sumansaurabh in #545
  • chore(release): publish SLSA provenance as a release asset (Signed-Releases) by @sumansaurabh in #546
  • chore: bump version to 0.6.3 across SDKs + CHANGELOG by @sumansaurabh in #547
  • fix(security): ignore the uncalled x/crypto openpgp advisory by @sumansaurabh in #548
  • chore(ci): pin workflow pip and npm installs by hash by @sumansaurabh in #550
  • fix(containerd): bound build-context tar extraction (DoS) by @sumansaurabh in #549
  • fix(security): replace vulnerable copies bundled in the pinned npm CLI by @sumansaurabh in #551
  • fix(quality): clear the open CodeQL findings by @sumansaurabh in #553
  • test(itest): register mount_source_validation_test.go in secrets-test-files by @sumansaurabh in #552
  • test(itest): regenerate secrets-tests.regex for mount-source UCs by @sumansaurabh in #554

Full Changelog: v0.6.2...v0.6.3