angelnereira opened PR #13473 from angelnereira:p3-truncate-readonly-regression to bytecodealliance:main:
Summary
- Add a p3 filesystem regression test for opening a read-only preopened file with TRUNCATE.
- Reuse the p3 test harness with a configurable WasiCtxBuilder so the test can install a read-only file preopen.
- Verify that the open fails with NotPermitted and that the file contents remain unchanged.
Context
This extends coverage for the permission invariant behind GHSA-2r75-cxrj-cmph / CVE-2026-47261 to the p3 filesystem path. The underlying fix is already present in the shared filesystem implementation; this PR adds p3-specific regression coverage so the invariant stays protected as p3 evolves.
Testing
- cargo fmt --all -- --check
- cargo test -p wasmtime-wasi --features p3 --test all p3_file_truncation_readonly
- git diff --check
angelnereira requested dicej for a review on PR #13473.
angelnereira requested wasmtime-wasi-reviewers for a review on PR #13473.
angelnereira requested wasmtime-core-reviewers for a review on PR #13473.
github-actions[bot] added the label wasi on PR #13473.
:thumbs_up: alexcrichton submitted PR review.
alexcrichton has enabled auto merge for PR #13473.
alexcrichton added PR #13473 Add p3 readonly truncation regression test to the merge queue.
github-merge-queue[bot] removed PR #13473 Add p3 readonly truncation regression test from the merge queue.
alexcrichton added PR #13473 Add p3 readonly truncation regression test to the merge queue.
:check: alexcrichton merged PR #13473.
alexcrichton removed PR #13473 Add p3 readonly truncation regression test from the merge queue.
Last updated: Jun 01 2026 at 09:49 UTC