Skip to content

Comments

fix(deserialize): overflow validation for uint64 fields#18

Open
yevshev wants to merge 1 commit intotempoxyz:mainfrom
yevshev:main
Open

fix(deserialize): overflow validation for uint64 fields#18
yevshev wants to merge 1 commit intotempoxyz:mainfrom
yevshev:main

Conversation

@yevshev
Copy link

@yevshev yevshev commented Feb 9, 2026

Summary

This PR adds uint64 overflow validation during deserialization to prevent silent truncation from malicious RLP payloads.

Changes

  • Add uint64 overflow validation to gas, nonce, validBefore, and validAfter fields
  • Extract repeated big.Int to uint64 conversion and validation into a shared bytesToUint64 helper
  • Expand TestDeserialize_OversizedSignatures into TestDeserialize_OversizedFields to also cover all uint64 fields

Testing

  • All Existing transaction package tests pass
  • New oversized field test cases assert correct error messages for gas, nonce, validBefore, validAfter

Closes #17

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.

Add overflow validation in deserialization for Gas and Nonce fields

1 participant