Mint and Emissions modules register errors with an error code of 1
Source: https://github.com/sherlock-audit/2024-06-allora-judging/issues/82
Found by
imsrybr0
Summary
Mint and Emissions modules register errors with an error code of 1
Vulnerability Detail
Mint and Emissions modules register errors with an error code of 1
Impact
According to the Cosmos SDK Errors documentation, the error code :
Must be greater than one, as a code value of one is reserved for internal errors.
This breaks that rule.
Code Snippet
var (
ErrUnauthorized = errors.Register(ModuleName, 1, "unauthorized message signer")
// ...
)
var (
ErrTopicReputerStakeDoesNotExist = errors.Register(ModuleName, 1, "topic reputer stake does not exist")
// ...
)
Tool used
Manual Review
Recommendation
Don't use 1 for error codes.
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/allora-network/allora-chain/pull/504
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A medium-severity misconfiguration bug in Allora. Sherlock made it public on 10 August 2024. Found in the 454 audit contest (finding M-16).
About Misconfiguration
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.