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

Improve MsgPack Deserialization Sanitization #70

Closed
dOrgJelli opened this issue Nov 18, 2020 · 3 comments · Fixed by #120
Closed

Improve MsgPack Deserialization Sanitization #70

dOrgJelli opened this issue Nov 18, 2020 · 3 comments · Fixed by #120
Labels

Comments

@dOrgJelli
Copy link
Contributor

Currently, when msgpack (in WASM or in JS) deserializes a buffer, it does not have sanitization logic for handling unexpected types or malformed data. We need this to happen at run-time because we don't want to run the risk of malformed input data getting sent to a smart contract, making funds at risk.

@mpetrunic
Copy link
Contributor

Don't you already have this? Looking at ReadDecoder it will error on decoding of invalid scalar value?

@dOrgJelli
Copy link
Contributor Author

Yes you're correct, some cases are already handled. I think we should break this issue into multiple, where each one defines a error case we must handle, and requires tests to be created for that case. Here are the error cases I've thought of so far, some more thought should be put into this:

@dOrgJelli
Copy link
Contributor Author

Created this issue for the remaining work here: #150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants