Skip to content
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

wasm32-unknown-unknown: must not re-enter module after abort #117344

Open
RalfJung opened this issue Oct 29, 2023 · 3 comments
Open

wasm32-unknown-unknown: must not re-enter module after abort #117344

RalfJung opened this issue Oct 29, 2023 · 3 comments
Labels
I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness O-wasm Target: WASM (WebAssembly), http://webassembly.org/

Comments

@RalfJung
Copy link
Member

@thomcc points out that when we abort on wasm32-unknown-unknown, there's nothing actually stopping whoever invoked that module from calling back into it. That's bad, it leads to unsoundness! We should either find some way to prevent this (I don't know how wasm works, maybe there's a global flag we can set on abort and check on every entry point), or we should at least document this prominently, in some place that people using this target are likely to see.

The wasi and emcscripten targets are not affected, they already "poison" modules on abort so they cannot be re-entered.

@RalfJung RalfJung added I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness O-wasm Target: WASM (WebAssembly), http://webassembly.org/ labels Oct 29, 2023
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 29, 2023
@oli-obk

This comment was marked as resolved.

@RalfJung

This comment was marked as resolved.

@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 30, 2023
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 30, 2023
@RalfJung
Copy link
Member Author

RalfJung commented Nov 4, 2023

See here for a good summary of the current situation and some history by @alexcrichton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness O-wasm Target: WASM (WebAssembly), http://webassembly.org/
Projects
None yet
Development

No branches or pull requests

5 participants