fix(deps): bump wasmtime 29→46 — close RUSTSEC-2026-0096 CVSS 9.0 (ARN-169)#345
Open
rita-aga wants to merge 1 commit into
Open
fix(deps): bump wasmtime 29→46 — close RUSTSEC-2026-0096 CVSS 9.0 (ARN-169)#345rita-aga wants to merge 1 commit into
rita-aga wants to merge 1 commit into
Conversation
…ox escape) Closes the CVSS 9.0 aarch64 Cranelift miscompilation (RUSTSEC-2026-0096) that let a WASM guest escape its linear-memory sandbox, plus ~18 other wasmtime / wasmtime-wasi advisories, by bumping wasmtime and wasmtime-wasi 29.0.1 → 46.0.1 (latest; workspace MSRV 1.92 / toolchain nightly 1.95). The only source break is the wasmtime-34 wasmtime-wasi module reorg (preview1 -> p1, pipe -> p2::pipe); five path renames in temper-wasm/src/engine/mod.rs. The core embedding API is unchanged and no sandbox control is weakened: per-invocation fresh Store, fuel budget, epoch wall-clock timeout, memory limiter, and WASI with no preopened dirs / no inherited env / no network (in-memory stderr pipe only). Also clears advisories reachable by a safe lockfile-only bump: postgres-protocol 0.6.12, tokio-postgres 0.7.18, quinn-proto 0.11.16, crossbeam-epoch 0.9.20, rustls-webpki 0.103.13. cargo audit: 37 -> 9 vulnerabilities; all 19 wasmtime/wasmtime-wasi advisories cleared. Remaining 9 have no safe bump here (rsa, tokio-tar: no fix; protobuf via pprof, rustls-webpki 0.102 via libsql: upstream-pinned; quick-xml: needs a temper-spec CSDL parser migration) and are tracked as follow-ups in ADR-0158. Refs ARN-169. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Collaborator
Author
|
@greptile review |
Collaborator
Author
ARN-165 principle audit — request changes / scope incompleteThe dependency upgrade is worthwhile, but it does not meet ARN-169's “clear advisories in both repos” acceptance criteria. Audit evidence
Required before closure
This upgrade also does not address the independent raw-host/stream-capability sandbox findings in ARN-207/208. Please narrow the title if those deliverables are intentionally moved to separate PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes ARN-169 (Urgent, security) under epic ARN-165. Draft for review — do not merge.
What
Bump wasmtime 29.0.1 → 46.0.1 (and
wasmtime-wasi) to close RUSTSEC-2026-0096 (CVSS 9.0 — aarch64 Cranelift miscompile → full WASM sandbox escape) plus the ~8 other wasmtime advisories.Changes (
crates/temper-wasm/src/engine/mod.rs,Cargo.toml,Cargo.lock)API migration for the v46 wasmtime-wasi layout — a pure path rename, no behavior change:
wasmtime_wasi::preview1→wasmtime_wasi::p1wasmtime_wasi::pipe::MemoryOutputPipe::new(64 * 1024)→wasmtime_wasi::p2::pipe::MemoryOutputPipe::new(64 * 1024)— same 64 KB output bound.The sandbox is not weakened: per-invocation store, fuel, epoch timeout, memory limiter, and WASI (no dirs/env/net) are all intact — verified by the sandbox-invariant tests.
Verification
Full pre-push workspace suite green against wasmtime 46 (this is the real check — the migration compiles and all tests pass). The 6 sandbox-invariant tests pass:
fuel_exhaustion_returns_error,memory_growth_denied_by_limiter,timeout_enforced_by_epoch,wasm_trap_does_not_crash_host,timed_out_invocation_does_not_interrupt_unrelated_active_invocation,noop_module_completes.Scope notes
🤖 Generated with Claude Code
Greptile Summary
This PR bumps
wasmtimeandwasmtime-wasifrom 29.0.1 to 46.0.1 to close RUSTSEC-2026-0096 (CVSS 9.0 — aarch64 Cranelift sandbox escape) and ~18 other advisories. The code change is a pure module-path migration required by the WASI reorganization that landed in wasmtime 34.Cargo.toml: Two-line version pin change; all sandbox-controllingwasmtimefeatures (component-model,profiling) are unchanged.crates/temper-wasm/src/engine/mod.rs: Four targeted renames —preview1→p1(imports + twoadd_to_linker_synccall sites) andwasmtime_wasi::pipe::MemoryOutputPipe→wasmtime_wasi::p2::pipe::MemoryOutputPipe— with no behavioral change; fuel, epoch timeout, memory limiter, and WASI no-dirs/no-env/no-net sandbox posture are all intact.docs/adrs/0159-wasmtime-46-bump.md: New ADR documenting the migration table, rationale for taking latest (46) over minimum-viable (36), and rollback policy.Confidence Score: 5/5
Safe to merge — the change is a pure API path rename required by wasmtime's WASI module reorganization, and every sandbox control is demonstrably intact.
The code diff is four targeted import/call-site renames with no logic changes. Fuel metering, epoch timeout, memory limiter, and the WASI no-dirs/no-env/no-net policy all remain exactly as they were in v29. The new
wasmtime_wasi::p2::pipe::MemoryOutputPipepath is the correct location for that type in v46 and is fully compatible withWasiCtxBuilder::build_p1(). The ADR is thorough, the migration table matches the diff line-for-line, and the PR author reports the full sandbox-invariant test suite passing against wasmtime 46.No files require special attention.
Important Files Changed
Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant Caller participant WasmEngine participant Store participant MemoryOutputPipe as p2::pipe::MemoryOutputPipe participant WasiCtxBuilder participant p1 as p1::add_to_linker_sync participant Guest as WASM Guest Caller->>WasmEngine: invoke_with_blobs(hash, context, limits) WasmEngine->>WasmEngine: spawn OS thread (stack 16 MB) WasmEngine->>MemoryOutputPipe: "MemoryOutputPipe::new(64 * 1024)" WasmEngine->>WasiCtxBuilder: new().stderr(pipe).build_p1() WasiCtxBuilder-->>WasmEngine: WasiP1Ctx WasmEngine->>Store: "new(engine, HostState{wasi_ctx, limiter, ...})" WasmEngine->>Store: set_fuel(max_fuel) WasmEngine->>Store: "limiter(MemoryLimiter{max_memory})" WasmEngine->>Store: set_epoch_deadline(ticks) alt pre-linked WASI module WasmEngine->>p1: add_to_linker_sync (compile_and_cache) WasmEngine->>Store: instance_pre_wasi.instantiate() else fallback re-link WasmEngine->>p1: add_to_linker_sync (invoke_blocking) WasmEngine->>Store: linker.instantiate() end WasmEngine->>Guest: run_fn.call(ctx_ptr, ctx_len) Guest-->>WasmEngine: result_ptr (or trap) WasmEngine->>MemoryOutputPipe: pipe.contents() [on empty result] WasmEngine-->>Caller: WasmInvocationResult%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant Caller participant WasmEngine participant Store participant MemoryOutputPipe as p2::pipe::MemoryOutputPipe participant WasiCtxBuilder participant p1 as p1::add_to_linker_sync participant Guest as WASM Guest Caller->>WasmEngine: invoke_with_blobs(hash, context, limits) WasmEngine->>WasmEngine: spawn OS thread (stack 16 MB) WasmEngine->>MemoryOutputPipe: "MemoryOutputPipe::new(64 * 1024)" WasmEngine->>WasiCtxBuilder: new().stderr(pipe).build_p1() WasiCtxBuilder-->>WasmEngine: WasiP1Ctx WasmEngine->>Store: "new(engine, HostState{wasi_ctx, limiter, ...})" WasmEngine->>Store: set_fuel(max_fuel) WasmEngine->>Store: "limiter(MemoryLimiter{max_memory})" WasmEngine->>Store: set_epoch_deadline(ticks) alt pre-linked WASI module WasmEngine->>p1: add_to_linker_sync (compile_and_cache) WasmEngine->>Store: instance_pre_wasi.instantiate() else fallback re-link WasmEngine->>p1: add_to_linker_sync (invoke_blocking) WasmEngine->>Store: linker.instantiate() end WasmEngine->>Guest: run_fn.call(ctx_ptr, ctx_len) Guest-->>WasmEngine: result_ptr (or trap) WasmEngine->>MemoryOutputPipe: pipe.contents() [on empty result] WasmEngine-->>Caller: WasmInvocationResultReviews (2): Last reviewed commit: "fix(deps): bump wasmtime 29→46 to close ..." | Re-trigger Greptile