NFTBridge
60,000 USDC
View results
Submission Details
Severity: high
Invalid

Incorrect Memory Manipulation at cairoStringPack in Cairo library

Hello ArkProject,

The assembly code shifts the value of v by 8 bits (shr(8, v)), which might not align correctly with the Cairo string format or the Solidity memory layout. This manipulation can lead to packing incorrect data into packedData.

The use of mload assumes that the data is aligned to 32 bytes, but the CAIRO_STR_LEN (31 bytes) means that the last byte of a 32-byte word might be incorrectly handled, especially when the string length is not a multiple of 32 bytes.

Updates

Lead Judging Commences

n0kto Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.