Skip to content

[34.0.2] backport fd_renumber fixes#11280

Merged
rvolosatovs merged 7 commits into
bytecodealliance:release-34.0.0from
rvolosatovs:backport/34/fd-renumber
Jul 18, 2025
Merged

[34.0.2] backport fd_renumber fixes#11280
rvolosatovs merged 7 commits into
bytecodealliance:release-34.0.0from
rvolosatovs:backport/34/fd-renumber

Conversation

@rvolosatovs
Copy link
Copy Markdown
Member

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

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 <rvolosatovs@riseup.net>
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Since `remove` is now only used once, remove it.

As a sideffect, this makes the implementation more explicit .

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
prtest:full

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
prtest:full

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
@rvolosatovs rvolosatovs requested review from a team as code owners July 18, 2025 12:01
@rvolosatovs rvolosatovs requested review from fitzgen and removed request for a team July 18, 2025 12:01
@github-actions github-actions Bot added wasi Issues pertaining to WASI wasmtime:docs Issues related to Wasmtime's documentation labels Jul 18, 2025
@rvolosatovs rvolosatovs merged commit e402901 into bytecodealliance:release-34.0.0 Jul 18, 2025
160 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