-
Notifications
You must be signed in to change notification settings - Fork 3
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
No Check for '0' feeAmount #691
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
duplicate-157
edited-by-warden
insufficient quality report
This report is not of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Comments
raymondfam marked the issue as sufficient quality report |
raymondfam marked the issue as duplicate of #15 |
raymondfam marked the issue as not a duplicate |
raymondfam marked the issue as insufficient quality report |
raymondfam marked the issue as duplicate of #157 |
alex-ppg marked the issue as unsatisfactory: |
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
duplicate-157
edited-by-warden
insufficient quality report
This report is not of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2024-01-decent/blob/011f62059f3a0b1f3577c8ccd1140f0cf3e7bb29/src/UTB.sol#L228
Vulnerability details
Impact
Potential Denial of Service (DoS) Attack with FeeAmount Check
Proof of Concept
https://github.com/code-423n4/2024-01-decent/blob/011f62059f3a0b1f3577c8ccd1140f0cf3e7bb29/src/UTB.sol#L108
https://github.com/code-423n4/2024-01-decent/blob/011f62059f3a0b1f3577c8ccd1140f0cf3e7bb29/src/UTB.sol#L259
In the code at line number 236 in the UTB.sol, there is a modifier that does not checks if the FeeAmount is 0. This condition, if not handled properly, can be exploited to perform a Denial of Service (DoS) attack by causing the affected functionality to be repeatedly called without incurring any fees.
If the FeeAmount is set to 0, the modifier will always fail, preventing the execution of the intended functionality.
Recommended Mitigation Steps
It is recommended to review the logic in the https://github.com/code-423n4/2024-01-decent/blob/011f62059f3a0b1f3577c8ccd1140f0cf3e7bb29/src/UTB.sol#L228 modifier and ensure that a FeeAmount of 0 is handled appropriately to prevent potential DoS attacks.
Add this on Line #233
The text was updated successfully, but these errors were encountered: