Skip to content
Misconfiguration Audit finding Beginner

Mint and Emissions modules register errors with an error code of 1

imsrybr0 Follow

Originally disclosed on Sherlock

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

mint errors

GOLANG
var (
	ErrUnauthorized                                    = errors.Register(ModuleName, 1, "unauthorized message signer")
	// ...
)

emissions errors

GOLANG
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

The original report as published on Sherlock, by imsrybr0. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

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.

More by imsrybr0

View all

12 more disclosed reports, best first.

More from Allora

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.