OverlayToken.burn function could burn tokens of any user
The burn function in OverlayToken.sol allowed any address with burner privileges to burn tokens from any user's balance without their consent. An attacker with burner permissions could destroy arbitrary amounts of other users' tokens.
Submitted by xYrYuYx
Impact
https://github.com/code-423n4/2021-11-overlay/blob/main/contracts/ovl/OverlayToken.sol#L366
The burner could burn any amount of tokens of any user. This is not good solution of burn
Tools Used
Manual
Recommended Mitigation Steps
Update burn function for only owner can burn his tokens. Now, ovl.burn function is used in OverlayV1OVLCollateral.sol file, and these updates won’t make any issue in protocol.
mikeyrf (Overlay) acknowledged:
sponsor acknowledged reason -
onlyBurnermodifier with access control privileges prevent unexpected burn amounts, given only collateral managers are given burn permissions
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 burn function lacked a check that the caller is the token owner or has explicit allowance to burn from that owner's balance.
What the attacker needed
Burner role or permission
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 token contract has a burn function that destroys tokens. In this case, the function did not check whose tokens were being burned, so anyone with the burner role could destroy tokens belonging to other people. This is dangerous because it lets someone else delete your tokens without your permission.
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.