-
Notifications
You must be signed in to change notification settings - Fork 847
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
[wasmer] multiple panics caused by unimplemented! macro #679
Comments
TODO: tag with fuzzer-trophy |
I think we shouldn't accept
|
We could have a dedicated Error like we have for CompileError, LinkError inside error.rs In term of security, In case of under development feature/code, yes it make sense to have unimplemented code but i'm not sure about the value of calling this macro inside master branch. |
@pventuzelo That's a good point; when used as an embedded runtime, having an error that the user can handle is definitely better -- I'm not sure what that would look like right now from a system call (though I'm sure we can make something work). The intention in the code I've been working on is to give people a specific message that they can file an issue with to let us know that a feature that they want or need isn't ready, so that I can prioritize it. The idea is to get rid of them as fast as is possible, but as a very small company we have a lot more potential work than resources right now. We can do that with a proper error type, too, though. In the case of Emscripten and to a much lesser extent WASI, if people are using it in production to run untrusted code right now, then their program terminating is the least of their concerns. We will be making them secure soon but resource constraints and all that. I do agree that for more stable and core parts, we should move toward removing |
I think WASI and Emscripten are fine for now, but we should for sure solve it on the runtime-core side of things on the short term :) |
I will work on those fixes next week ;) |
861: [fix issue #679] add details when calling unimplemented! r=MarkMcCaskey a=pventuzelo # Description As discuss in issue #679, `unimplemented!` should provide a string to explain at least where the issue occurs. This pull request only add messages on existing `unimplemented!` and don't change any previous logics/behaviors in the code. # Review - [x] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Patrick Ventuzelo <ventuzelo.patrick@gmail.com> Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
I think we can close this issue. |
Describe the bug
The macro
unimplemented!
is defined as following in: https://doc.rust-lang.org/1.6.0/std/macro.unimplemented!.htmlThis macro is used multiple time in wasmer and make it panic:
Vulnerable code
Based on github search in this repository, 31 files are using unimplemented! macro (https://github.com/wasmerio/wasmer/search?q=unimplemented%21&type=Code)
Expected behavior
unimplemented!
should be replaced by an Error to prevent wasmer to panic.This will require a bit of code rewritting :s
Steps to reproduce
This file is given as an example:
Download unimplemented.zip
Status of my environment
wasmer version: commit 5239cdb
The text was updated successfully, but these errors were encountered: