Skip to content

[35.0.0] backport fd_renumber fixes #11281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

rvolosatovs
Copy link
Member

This a security advisory fix PR moved from https://github.com/bytecodealliance/wasmtime-ghsa-fm79-3f68-h2fc/pull/3

this includes #11277 and #11276

The implementation assumed that only the runtime could ever issue FDs,
however that's not the case in p1, where guests can choose arbitrary
FDs to use (e.g. via `fd_renumber`).

Due to incorrect accounting, guests could "mark" arbitrary FDs as "free"
and trigger a panic in the host by requesting a new FD.

Signed-off-by: Roman Volosatovs <[email protected]>
Since `remove` is now only used once, remove it.

As a sideffect, this makes the implementation more explicit .

Signed-off-by: Roman Volosatovs <[email protected]>
Signed-off-by: Roman Volosatovs <[email protected]>
prtest:full

Signed-off-by: Roman Volosatovs <[email protected]>
@rvolosatovs rvolosatovs requested review from a team as code owners July 18, 2025 12:02
@rvolosatovs rvolosatovs requested review from alexcrichton and removed request for a team July 18, 2025 12:02
@rvolosatovs rvolosatovs changed the base branch from main to release-35.0.0 July 18, 2025 12:02
@github-actions github-actions bot added wasi Issues pertaining to WASI wasmtime:docs Issues related to Wasmtime's documentation labels Jul 18, 2025
@rvolosatovs
Copy link
Member Author

looks like CI is hanging, I'll give it a little push!

prtest:full

Signed-off-by: Roman Volosatovs <[email protected]>
@rvolosatovs rvolosatovs force-pushed the backport/35/fd-renumber branch from 2d74c79 to 29ec91d Compare July 18, 2025 17:14
@rvolosatovs rvolosatovs merged commit 62c7e83 into bytecodealliance:release-35.0.0 Jul 18, 2025
165 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 wasmtime:docs Issues related to Wasmtime's documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants