Missing `__Ownable_init()` call in `LenderCommitmentGroup_Smart::initialize()`
The contract's initialize function does not call the Ownable initializer, leaving it without an owner. As a result, the owner-only pause and unpause functions cannot be invoked, so borrowing cannot be paused.
0x73696d616f Follow with 0xAnmol, Afriaudit and 3 others
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2024-04-teller-finance-judging/issues/35
Found by
0x73696d616f, 0xAnmol, Afriaudit, AuditorPraise, EgisSecurity, MohammedRizwan
Summary
__Ownable_init() is not called in LenderCommitmentGroup_Smart::initialize(), which will make the contract not have any owner.
Vulnerability Detail
LenderCommitmentGroup_Smart::initialize() does not call __Ownable_init() and will be left without owner.
Impact
Inability to pause and unpause borrowing in LenderCommitmentGroup_Smart due to having no owner, as these functions are onlyOwner.
Code Snippet
Tool used
Manual Review
Vscode
Recommendation
Modify LenderCommitmentGroup_Smart::initialize() to call __Ownable_init():
function initialize(
...
) external initializer returns (address poolSharesToken_) {
__Ownable_init();
}
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/teller-protocol/teller-protocol-v2-audit-2024/pull/13
sherlock-admin2
The Lead Senior Watson signed off on the fix.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the initialize function omitted the call to __Ownable_init(), so the owner variable was never set.
What the attacker needed
None
The fix
The initialize function should call __Ownable_init() to set an owner; the protocol team fixed this issue.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract often has an owner who can perform special actions. Here, the setup function forgot to assign an owner, so nobody can use the owner-only pause feature. This means if something goes wrong, the team cannot stop borrowing.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.