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

QA Report #122

Open
code423n4 opened this issue Jul 1, 2022 · 1 comment
Open

QA Report #122

code423n4 opened this issue Jul 1, 2022 · 1 comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax

Comments

@code423n4
Copy link
Contributor

QA

[QA-1] Wrong argument for error SenderNotCNote()

https://github.com/Plex-Engineer/lending-market-v2/blob/ea5840de72eab58bec837bb51986ac73712fcfde/contracts/Accountant/AccountantDelegate.sol#L51
https://github.com/Plex-Engineer/lending-market-v2/blob/ea5840de72eab58bec837bb51986ac73712fcfde/contracts/Accountant/AccountantDelegate.sol#L65

Sender address was expected to be inputed as the argument. But in the current implementation, the note address is inputed as the argument

RECOMMENDED MITIGATION STEP
Change address(note) to msg.sender

[QA-2] _accountant address is allowed to do reentrancy

https://github.com/Plex-Engineer/lending-market-v2/blob/ea5840de72eab58bec837bb51986ac73712fcfde/contracts/CNote.sol#L156-L157

Removing the check that msg.sender != _accountant can save gas (by reducing action in code), beside it also can prevent any security issue by including _accountant to the validation step

@code423n4 code423n4 added bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels Jul 1, 2022
code423n4 added a commit that referenced this issue Jul 1, 2022
@GalloDaSballo
Copy link
Collaborator

[QA-1] Wrong argument for error SenderNotCNote()

Valid NC

[QA-2] _accountant address is allowed to do reentrancy

Valid Low. Agree that no caller should be allow to reEnter

Neat unique report, 1L 1NC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Projects
None yet
Development

No branches or pull requests

2 participants