The requestSerialize
function relies on the Cairo.cairoStringSerialize
and potentially other Cairo-specific library functions, which may not initialize the required mappings properly.
Uninitialized mappings or vectors used within these serialization functions can lead to incomplete or corrupted data, causing issues during message transfers.
Affected Code:
Consider a scenario where Bob and Alice attempt to serialize a request:
An example scenario where uninitialized mappings cause the contract to malfunction:
If Cairo.cairoStringSerialize
does not handle uninitialized mappings correctly, this could corrupt the serialized
data.
Severity: Medium
Data Corruption: Potential for serialized request data to be incomplete or corrupted.
Transaction Failures: Erroneous serialization can prevent successful message transfers and other operations.
Manual Code Review
Mapping Initialization: Ensure all mappings are initialized before they are used.
Robust Serialization: Add checks within Cairo.cairoStringSerialize
to confirm that all necessary mappings or vectors are properly initialized.
Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.