When we get the base URI, we modify the free memory pointer. Then, return it to the correct value, but handling it is not 100%
correct.
We store the Free memory pointer value in ret
(preserve it)
We stored the size of the returned data (+ 0x20)
Copying the returned data into memory (+ returned data length)
When we update the free memory pointer we will find that it is updated like this:
FMP = old FMP value + 0x20 + returnSize + 0x20
So we are adding an additional 0x20
without reason as the value should be increased by 0x20 + returnSize
not 0x20 + returnSize + 0x20
.
Incorrect Memory Managment.
Foundry Debugger
Don't add this excessive 0x20
value.
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.