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

Switch to bytecheck-secured argument passing in Piecrust uplink helpers #324

Closed
miloszm opened this issue Feb 8, 2024 · 0 comments
Closed
Assignees
Labels
team:Core Low Level Core Development Team (Rust) type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)

Comments

@miloszm
Copy link
Contributor

miloszm commented Feb 8, 2024

Summary

Currently, Piecrust uplink helpers, which are used in contracts for contract methods' argument passing, use unsafe way of deserialising arguments. This is not optimal for the overall integrity and security of the system, as it allows contract callers to maliciously or accidentally send corrupted arguments. In addition, such corruption is undetected and causes harder to track problems.

Possible solution design or implementation

We need to use safe code to deserialise contract methods' arguments, and in particular, we should use bytecheck checking in such a way, that an error in bytecheck checking is causing panic.

Additional context

This improvement will require changes in Rusk code.

@miloszm miloszm added team:Core Low Level Core Development Team (Rust) type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc) labels Feb 8, 2024
@miloszm miloszm self-assigned this Feb 8, 2024
@ureeves ureeves closed this as completed Feb 13, 2024
@ureeves ureeves mentioned this issue Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:Core Low Level Core Development Team (Rust) type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)
Projects
None yet
Development

No branches or pull requests

2 participants