Skip to content
Access control Audit finding Intermediate

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.

xYrYuYx Follow

Originally disclosed on Code4rena

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 - onlyBurner modifier with access control privileges prevent unexpected burn amounts, given only collateral managers are given burn permissions

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

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.

More by xYrYuYx

View all

3 more disclosed reports, best first.

More from Overlay Protocol contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.