This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
Irissme - Missing Range Check in removeStakingRewardsContract Function #43
Labels
Excluded
Excluded by the judge without consulting the protocol or the senior
Non-Reward
This issue will not receive a payout
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
Irissme
medium
Missing Range Check in removeStakingRewardsContract Function
Summary
The removeStakingRewardsContract function in the StakingRewardsManager.sol file lacks a check to ensure that the provided index i is within the bounds of the stakingContracts array. This omission may lead to unexpected memory access issues.
Vulnerability Detail
The vulnerability lies in the removeStakingRewardsContract function, where the absence of a check on the index may result in accessing memory outside the valid range of the stakingContracts array.
Impact
This vulnerability could potentially lead to runtime errors, including but not limited to accessing unexpected memory locations, which may compromise the integrity and functionality of the contract.
Code Snippet
https://github.com/sherlock-audit/2024-01-telcoin/blob/main/telcoin-audit/contracts/telx/core/StakingRewardsManager.sol#L166-L179
Tool used
Manual Review
Recommendation
The text was updated successfully, but these errors were encountered: