code-423n4 / 2022-01-notional-findings

1 stars 3 forks source link

Missing check on newOwner and owner #215

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

Fitraldys

Vulnerability details

Impact

There is missing check on newOner and owner, the current owner might accidentally update the new owner to the same address as owner.

Proof of Concept

https://github.com/code-423n4/2022-01-notional/blob/main/contracts/utils/BoringOwnable.sol#L21

Recommended Mitigation Steps

require(newOwner != owner);

jeffywu commented 2 years ago

There is no negative effect of this.

pauliax commented 2 years ago

It will be just wasted gas for a useless tx at worst.