-
Notifications
You must be signed in to change notification settings - Fork 378
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
Two critical VM issues (denial of service attacks) #2738
Labels
Milestone
Comments
I'll take a stab at solving the first issue listed here
|
7 tasks
thehowl
pushed a commit
that referenced
this issue
Sep 12, 2024
…ons (#2781) <!-- please provide a detailed description of the changes made in this pull request. --> This is to fix the first issue mentioned in #2738. In short, when allocating and reallocating slices' underlying arrays, the VM was building the `TypedValue` slice before making the necessary VM allocations. It is important the VM allocations be done before the `TypedValue` allocations to ensure the values being allocated won't exceed the VM's limit. In extreme cases, unchecked allocations resulted in the VM hanging as it tried to allocate massive `TypedValue` slices in the go runtime. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [x] Provided any useful hints for running manual tests - [x] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
First issue has been fixed. The second issue needs to be triaged to determine if it poses a critical threat for the chain at launch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Two critical VM issues (denial of service attacks)
Hey everyone, I am a Web3 cybersecurity researcher working for Hacken specializing in layer 1 protocols and virtual machines. I met with the Gno team during Web3 Summit in Berlin where they introduced me to your project. I promised to check it out because it sounded very interesting to me. I spent a day playing with your project and virtual machine and managed to find two ways to crash it.
Critical issues
or alternatively:
I used the following test to reproduce these issues: crash_test.go.zip. You should put it in
gno.land/pkg/sdk/vm
and run it there withgo test -v -run TestVMCrash
.Next steps
I highly recommend introducing Fuzzing in your project and undergoing a full audit before launching your product.
Feel free to contact me here or by sending an email to [email protected] if you need any help.
The text was updated successfully, but these errors were encountered: