https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/main/protocol/contracts/libraries/LibDibbler.sol#L100
https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/main/protocol/contracts/libraries/LibDibbler.sol#L412
https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/main/protocol/contracts/libraries/LibDibbler.sol#L394
https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/main/protocol/contracts/beanstalk/market/MarketplaceFacet/PodTransfer.sol#L79
https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/main/protocol/contracts/beanstalk/market/MarketplaceFacet/PodTransfer.sol#L47
There is no limit to the size of the plot that an account can hold this will lead to DOS as the field.plotIndexes
array grows too large.
When sowing bean, the index is added to s.accts[account].fields[s.sys.activeField].plotIndexes.push(index)
this array can grow large and cause a DOS in the system.
This array can also grow when the plot is transferred.
The function below loops through the field.plotIndexes
and will get more expensive as the array grows larger. The findPlotIndexForAccount
is used in the LibDribbler.removePlotIndexFromAccount
function that is used extensively in the system including pod transfer.
Plot cannot be removed from an account because it relies on the findPlotIndexForAccount
.
Plot transfer will be broken because it relies on the LibDribbler.removePlotIndexFromAccount
.
Pod market will be broken.
Plot cannot be harvested
Manual Analysis
Set a maximum value for the length of the s.accts[account].fields[s.sys.activeField].plotIndexes
array.
Invalid as per docs https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity
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.