Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make a zero address check on SecuredLine.rollover #113

Closed
code423n4 opened this issue Nov 7, 2022 · 2 comments
Closed

make a zero address check on SecuredLine.rollover #113

code423n4 opened this issue Nov 7, 2022 · 2 comments
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working unsatisfactory findings doesn't meet requirement

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/debtdao/Line-of-Credit/blob/audit/code4rena-2022-11-03/contracts/modules/credit/SecuredLine.sol#L48

Vulnerability details

Impact:
Making a zero address check on variable address newline will reduce a risk of making maliciously newline equal to zero address which can stop a function from being deployed on new line address.

Proof of concept:

https://github.com/debtdao/Line-of-Credit/blob/audit/code4rena-2022-11-03/contracts/modules/credit/SecuredLine.sol#L48

EscrowedLine._rollover(newLine);
https://github.com/debtdao/Line-of-Credit/blob/audit/code4rena-2022-11-03/contracts/modules/credit/SecuredLine.sol#L59

which can further effect _rollover function in EscrowedLine.sol contract.
function _rollover(address newLine) internal virtual returns(bool) {
require(escrow.updateLine(newLine));
return true;
}
https://github.com/debtdao/Line-of-Credit/blob/audit/code4rena-2022-11-03/contracts/modules/credit/EscrowedLine.sol#L89

Recommendation:
Make a necessary zero address check.

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Nov 7, 2022
code423n4 added a commit that referenced this issue Nov 7, 2022
@dmvt
Copy link

dmvt commented Nov 15, 2022

Zero address checks are considered QA.

@c4-judge c4-judge added the unsatisfactory findings doesn't meet requirement label Nov 15, 2022
@c4-judge
Copy link
Contributor

dmvt marked the issue as unsatisfactory:
Overinflated severity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working unsatisfactory findings doesn't meet requirement
Projects
None yet
Development

No branches or pull requests

3 participants