Skip to content

fix(parser): raise MAX_SLICE_LEN to 256MB — large wasip2 components sign (#164, unbreaks release) - #213

Merged
avrabe merged 1 commit into
mainfrom
fix/max-slice-len-component-coremodule
Aug 5, 2026
Merged

fix(parser): raise MAX_SLICE_LEN to 256MB — large wasip2 components sign (#164, unbreaks release)#213
avrabe merged 1 commit into
mainfrom
fix/max-slice-len-component-coremodule

Conversation

@avrabe

@avrabe avrabe commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

The real #164 bug — and the actual cause of the failing release. My earlier close (#192) was premature; #192 only surfaced it (hard-requirement → loud failure instead of silent drop).

What happened

2026-08-05 release (after the ureq/#212 build fix): reached the sign step. wsc-component.wasm (3.96MB) signed fine; wsc-cli.wasm → "Parse error".

Root cause

Section::deserialize rejects any section payload > MAX_SLICE_LEN (16MB). A wasm component's embedded core-module section for a full wasm32-wasip2 CLI exceeds 16MB. Reproduced with a synthetic >16MB-section module (ParseError → signs+verifies at 256MB).

Fix

Raise MAX_SLICE_LEN 16MB → 256MB. Generous for any realistic component, still bounds a single host allocation. Excessive-length rejection still holds (test value > 256MB). 166 verify-core tests pass; big-section + small-module sign/verify round-trips confirmed locally. Tighter input-bounded read noted as embedded-profile (REQ-15) follow-up.

Closes #164 (for real this time). Unblocks the release sign step + agora#3.

🤖 Generated with Claude Code

…sign (#164)

The real #164 bug — my earlier "stale" close (#192) was premature; #192
only *surfaced* it by making wsc-cli.wasm signing a hard requirement. The
2026-08-05 release then failed at "Sign WASM Files": wsc-component.wasm
(3.96MB) signed fine, but wsc-cli.wasm (full CLI, large embedded core
module) hit "Parse error".

Root cause: Section::deserialize rejects any section whose payload exceeds
MAX_SLICE_LEN (was 16MB). A wasm COMPONENT's embedded core-module section
for a full wasm32-wasip2 CLI exceeds 16MB. Reproduced with a synthetic
>16MB-section module (was ParseError; signs+verifies at 256MB).

Raise the bound to 256MB — generous for any realistic component, still
bounds a single host allocation. The excessive-length rejection still
holds (test value > 256MB). 166 verify-core tests pass; the varint Kani
proof is parameterized on the constant. Tighter input-bounded read noted
for the embedded profile (REQ-15).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@avrabe
avrabe merged commit 2607571 into main Aug 5, 2026
16 of 17 checks passed
@avrabe
avrabe deleted the fix/max-slice-len-component-coremodule branch August 5, 2026 16:25
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

avrabe added a commit that referenced this pull request Aug 5, 2026
* release: v0.9.4 — unbreak the release + real #164 fix (sign large wasip2 components)

Ships the release-integrity fixes now on main:
- #213: MAX_SLICE_LEN 16MB -> 256MB so wsc-cli.wasm (large embedded core
  module) signs+verifies — the real #164 bug (rivet REQ-19 / DD-10).
- #212: bare @wsc_deps//:ureq Bazel alias (dep drift unbroke the build).
- #214: witness MC/DC baseline 12->17 (std/dep churn, documented; #128).
- accumulated dep/action bumps since v0.9.3.

Verified: release run build->sign->verify->publish green; 609 lib tests
pass; Kani varint proof holds; witness gate green (17==17).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* release: sync Bazel version strings 0.9.0 -> 0.9.4 (clean-room finding)

The Bazel-built CLI injects CARGO_PKG_VERSION from src/cli/BUILD.bazel's
VERSION const, and MODULE.bazel carries the module version — both were
stale at 0.9.0 despite 'keep in sync with workspace.version' comments.
The release builds wsc-cli.wasm via Bazel, so the shipped CLI would have
reported 0.9.0. Caught by the pre-tag clean-room verification.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* release: bump crossbeam-epoch 0.9.20 + wasmtime patch (RUSTSEC-2026-0204/0222/0223)

Cargo Audit flagged 3 advisories in deps accumulated since v0.9.3:
- crossbeam-epoch RUSTSEC-2026-0204 (invalid ptr deref) -> 0.9.20
- wasmtime RUSTSEC-2026-0222 (type-index mixup) + RUSTSEC-2026-0223
  (bulk-op preemption) -> patched (wasmtime is optional/runtime-only,
  not in shipped binaries, but audit scans the whole lock).
cargo audit clean (exit 0). Lockfile-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

friction: wsc can't sign its own wasm32-wasip2 output — blocks org-wide sigil-sign-wasm standard

1 participant