Wrong memory access in _msgSender().
When msg.data is copied to memory as 'array':
First 32 bytes: stores the length of the array
Next bytes: contains the actual calldata
Setting index to msg.data.length means we're pointing to the end of the array.
For example:
If msg.data is 100 bytes long:
Setting index = msg.data.length means index = 100
This points to position 100 in memory
But the valid data only exists from position 0 to 99
Position 100 is already outside of the array
The mload operation reads 32 bytes starting from this position. This reads beyond the allocated memory space. It could be reading from:
Uninitialized memory
Memory from other operations
Sensitive data from other contract operations
In the _msgSender() function, this means we're attempting to read 32 bytes starting from a position that's already beyond the valid data, which is unsafe and can lead to reading unrelated memory content.
Here's a breakdown of what the Assembly code is doing:
When _msgSender() is the contract address, wrong value would be stored as sender and this could cause different issues depending on what is read outside of the allocated space.
Manual review
Value should be read within the allocated bounds:
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.