Skip to content

Conversation

@sasurobert
Copy link
Contributor

No description provided.

google-labs-jules bot and others added 5 commits July 31, 2025 09:19
This change introduces several security enhancements to the VM host to make it more robust against potentially malicious smart contract code.

The following changes were made:
- In `vmhooks/bigIntOps.go`, changed silent failures for out-of-range argument indexes to explicit execution failures.
- In `vmhooks/manBufOps.go`, changed silent failures for out-of-bounds slice operations to explicit execution failures.
- In `vmhooks/manBufOps.go`, added a `recover` block to `MBufferToBigFloat` to prevent panics in `GobDecode` from crashing the VM.
- In `contexts/managedType.go`, improved the bounds checking in `GetSlice` to be safer against integer overflows.
- In `hostCore/execution.go`, removed a redundant `defer` block to improve code clarity.
- Updated several test scenarios to reflect the new, stricter error handling.
@codecov
Copy link

codecov bot commented Aug 5, 2025

Codecov Report

❌ Patch coverage is 1.75439% with 448 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.47%. Comparing base (05006fc) to head (8726b32).

Files with missing lines Patch % Lines
vmhost/vmhooks/managedei.go 0.00% 218 Missing and 3 partials ⚠️
vmhost/vmhooks/baseOps.go 0.00% 116 Missing ⚠️
vmhost/vmhooks/cryptoei.go 0.00% 99 Missing ⚠️
vmhost/vmhooks/manBufOps.go 28.57% 4 Missing and 1 partial ⚠️
vmhost/contexts/managedType.go 60.00% 2 Missing and 2 partials ⚠️
vmhost/vmhooks/bigIntOps.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #955      +/-   ##
==========================================
- Coverage   36.23%   35.47%   -0.76%     
==========================================
  Files          87       87              
  Lines       20589    21037     +448     
==========================================
+ Hits         7460     7463       +3     
- Misses      12462    12901     +439     
- Partials      667      673       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sasurobert
Copy link
Contributor Author

moved implementation to new PR.

@sasurobert sasurobert closed this Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants