Skip to content

Add p3 readonly truncation regression test#13473

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
angelnereira:p3-truncate-readonly-regression
May 25, 2026
Merged

Add p3 readonly truncation regression test#13473
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
angelnereira:p3-truncate-readonly-regression

Conversation

@angelnereira
Copy link
Copy Markdown
Contributor

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 angelnereira requested review from a team as code owners May 24, 2026 12:28
@angelnereira angelnereira requested review from dicej and removed request for a team May 24, 2026 12:28
@github-actions github-actions Bot added the wasi Issues pertaining to WASI label May 24, 2026
@alexcrichton alexcrichton enabled auto-merge May 24, 2026 15:17
@alexcrichton alexcrichton added this pull request to the merge queue May 24, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 24, 2026
@alexcrichton alexcrichton added this pull request to the merge queue May 25, 2026
Merged via the queue into bytecodealliance:main with commit dafc544 May 25, 2026
100 of 102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasi Issues pertaining to WASI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants