You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fastForwardMultipleStreams function processes arrays of nounIds and ticksToForward to fast-forward multiple streams. However, the function lacks ownership validation for the nounIds before calling fastForwardStream(nounIds[i], ticksToForward[i]). This allows for unintended or unauthorized manipulation of streams by callers who do not own the nounIds in question.
ROOT CAUSE
The absence of a check to ensure the caller owns each nounId being processed leads to potential misuse of the fastForwardMultipleStreams function.
PRECONDITIONS
Internal Precondition
The fastForwardStream function does not verify ownership of the nounId.
External Precondition
A caller supplies an array of nounIds they do not own.
ATTACK PATH
A malicious user calls fastForwardMultipleStreams with an array of nounIds, including IDs they do not own.
The function processes these IDs without validating ownership, potentially impacting streams belonging to other users.
IMPACT
Unauthorized manipulation of streams owned by other users.
Potential disruption or misuse of streams, impacting system integrity.
PROOF OF CONCEPT (PoC)
MITIGATION
Add ownership validation for each nounId in the fastForwardMultipleStreams loop:
function fastForwardMultipleStreams(uint256[] calldatanounIds, uint32[] calldataticksToForward) external {
require(nounIds.length== ticksToForward.length, "length mismatch");
for (uint256 i; i < nounIds.length; ++i) {
require(msg.sender== nounsToken.ownerOf(nounIds[i]), "Caller does not own nounId");
fastForwardStream(nounIds[i], ticksToForward[i]);
}
}
The text was updated successfully, but these errors were encountered:
sherlock-admin4
changed the title
Generous Peanut Platypus - Denial of Service in cancelStreams Due to Single Failing nounId
OlaHamid - Denial of Service in cancelStreams Due to Single Failing nounId
Dec 4, 2024
OlaHamid
Medium
Denial of Service in cancelStreams Due to Single Failing nounId
Permalink
SUMMARY
The
fastForwardMultipleStreams
function processes arrays ofnounIds
andticksToForward
to fast-forward multiple streams. However, the function lacks ownership validation for thenounIds
before callingfastForwardStream(nounIds[i], ticksToForward[i])
. This allows for unintended or unauthorized manipulation of streams by callers who do not own thenounIds
in question.ROOT CAUSE
The absence of a check to ensure the caller owns each
nounId
being processed leads to potential misuse of thefastForwardMultipleStreams
function.PRECONDITIONS
Internal Precondition
fastForwardStream
function does not verify ownership of thenounId
.External Precondition
nounIds
they do not own.ATTACK PATH
fastForwardMultipleStreams
with an array ofnounIds
, including IDs they do not own.IMPACT
PROOF OF CONCEPT (PoC)
MITIGATION
Add ownership validation for each
nounId
in thefastForwardMultipleStreams
loop:The text was updated successfully, but these errors were encountered: