Conversation
43.0.1 is affected by six distinct advisories: wasmtime RUSTSEC-2026-0114 (CVE-2026-44216, table allocation panic), -0222 (cross-engine type indices) and -0269 (filesystem sandbox escape via trailing slashes), plus wasmtime-wasi RUSTSEC-2026-0149 (path_open TRUNCATE bypasses FilePerms::WRITE), -0182 (fd_renumber leak) and -0188 (hard links and renames bypass destination FilePerms). 47.0.4 returns none for both crates. RUSTSEC-2026-0269 is reachable through this module: wasmtime_linker_define_wasi() defines the WASI p1 path surface and every access.filesystem entry is preopened read+write with the host path used verbatim as the guest path. The c-api build turns WASMTIME_FEATURE_WASI_HTTP off; the wasm module only uses p1 WASI and v47 defaults wasi-http on, which pulls the rustls stack into the linked library. Source compatibility checked against the v47 headers: every symbol the module calls still exists; the only signature changes are added const, and the removed declarations are the unused externref/anyref GC helpers. The tarball comes from the mirror: freeunitorg/packages.freeunitorg.github.io#10. EOL.md and pkg/eol.json now name both pins at 47.0.4.
cargo audit reads Cargo.lock files only, so the wasmtime source tarball that pkg/contrib fetches has never had an automated advisory check. check-advisories.py reads WASMTIME_VERSION, queries OSV for wasmtime and wasmtime-wasi at that version, and refuses to trust the pin unless pkg/eol.json and SHA512SUMS agree with the version file. Run against 43.0.1 it reports the six advisories the bump closes, including three wasmtime-wasi path/permission issues that #400 did not name; 47.0.4 is clean. The new pins job joins the existing weekly schedule, and the path filters cover pkg/contrib/src/*/version and SHA512SUMS so a pin bump cannot skip it.
The legacy wasm module had compile-only CI and no runtime test at all. test/test_wasm.py builds test/wasm/hello/hello.c at test time against pkg/contrib's wasi-sysroot and libunit-wasm source, then drives it through unitd: a fixed body, a file read inside an access.filesystem preopen, and a denied read outside it including a symlink with the trailing slash RUSTSEC-2026-0269 abused. The wasm build-test leg now installs pytest and the guest toolchain, configures with --rpath so pytest can dlopen the module, runs unprivileged so the guest build is runner-owned, and fails if no test_wasm.py test passed instead of going green on a skip. Its timeout grows to 45 minutes because the first run on a bumped pin rebuilds wasmtime from source. Local: pytest test/test_wasm.py -> 3 passed against 47.0.4.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2cbe0d591a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Review follow-up. On Ubuntu, clang -dumpversion prints the full release (21.1.8 here, 20.1.8 in the wasi-sdk), so the old command asked apt for a libclang-rt-20.1.8-dev-wasm32 that does not exist and the wasm leg died before the tests. Take the major component with cut -d. -f1. The linker flags were already a single -Wl, argument: adjacent string literals concatenate, so clang received -Wl,...,--stack-first,-z,stack-size=8388608 and passed -z stack-size=8388608 to the linker. Verified both ways with system clang 21 (the joined form is accepted, only the standalone -z,stack-size=... is an unknown argument), but the implicit split invited the misread, so build the flag explicitly now. pytest test/test_wasm.py still 3 passed.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9d6a26439
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@claude review |
|
Claude finished @andypost's task in 6m 38s —— View job Review — PR #418
The pin bump itself is solid and well argued: A few things I'd want fixed before merge. 1. The app config never names the guest's init/end handlers
So That the three tests pass anyway is the worrying part. In wasm32 linear memory address 0 is an ordinary writable address, so the copy 2. A guest build failure produces no diagnostics anywhere
The workflow's fallback is no help either: 3.
|
Closes #400.
The contrib wasmtime pin was 43.0.1, four majors behind the Rust pin, and
nothing audited it:
cargo auditreadsCargo.lockfiles only, andpkg/contribfetches a source tarball. This brings both pins to 47.0.4, adds anOSV check keyed on the version file, and gives the legacy
wasmmodule itsfirst runtime test.
Advisories
An OSV query on 43.0.1, deduplicated against aliases, returns six advisories.
47.0.4 returns none for either crate:
path_open(TRUNCATE)bypassesFilePerms::WRITEfd_renumberleakFilePerms#400 named only -0269 and -0222; the check added here found the other three
wasmtime-wasi path/permission advisories on its first run.
-0269 is reachable through this module:
wasmtime_linker_define_wasi()(
src/wasm/nxt_rt_wasmtime.c:359) defines the WASI p1 surface includingpath_open, and eachaccess.filesystementry is preopened read+write with thehost path used verbatim as the guest path (
:283-291). The new test exercisesthe sandbox boundary, including the symlink-with-trailing-slash shape.
Changes
pkg/contrib/src/wasmtime/{version,SHA512SUMS}, and-DWASMTIME_FEATURE_WASI_HTTP=OFFin the c-api build. v47 defaults wasi-httpon, which pulls the rustls stack into the linked
libwasmtime.sofor an APIthis module never uses. Source compatibility checked against the v47 headers:
every symbol the module calls still exists, the only signature changes are
added
const, and the removed declarations are the unusedexternref/anyrefGC helpers.pkg/contrib/check-advisories.pyand apinsjob inAudit (cargo). It readsWASMTIME_VERSION, queries OSV forwasmtimeandwasmtime-wasi, and refuses to pass unlesspkg/eol.jsonandSHA512SUMSagree with the version file. The workflow's path filters cover the pin files,
so a bump cannot skip it.
test/test_wasm.pybuilds a libunit-wasm guest frompkg/contribsources at test time and drives it through unitd: a fixed body,a file read inside an
access.filesystempreopen, and a denied read outsideit. The wasm build-test leg now installs pytest and the guest toolchain, uses
--rpathso pytest can dlopen the module, runs unprivileged so the guestbuild stays runner-owned, and fails if no smoke test passed instead of going
green on a skip. Timeout 30 -> 45 minutes because the first run on a bumped
pin is a cold wasmtime build.
EOL.mdandpkg/eol.jsonname both pins at 47.0.4, each coveredby the check that can reach it.
Verification
python3 pkg/contrib/check-advisories.pyexits 1 on 43.0.1 listing the sixadvisories above, and 0 on 47.0.4.
make -C pkg/contrib .wasmtimebuilds the c-api from source with the featureoff;
./configure wasm --rpath ... && make wasmcompiles without warnings.pytest test/test_wasm.py-> 3 passed.packages.freeunit.org/wasmtime/wasmtime-v47.0.4-src.tar.gzreturns 200 at199,762,846 bytes with SHA-512
3a27dada...b078, matching the committedSHA512SUMS.Notes
CHANGES/docs/changes.xmlentry: the release process generates those.pkg/deb/pkg/rpmwasm Makefiles use a Rust 1.88 toolchain that alreadycould not build 43.x (1.91 floor); no CI target builds wasm through them, so
they are untouched.
Checklist