sherlock-audit / 2023-06-dinari-judging

5 stars 4 forks source link

holyhansss - Possible DOS in Orderprocessor.requestOrder() #100

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

holyhansss

medium

Possible DOS in Orderprocessor.requestOrder()

Summary

requestOrder() can be DOSed

Vulnerability Detail

In Orderprocessor.requestOrder(), salt is generated by a user. Exposure of the salt value generated by a user in the mempool allows other malicious users to replicate the value and create identical orders. As a result, the original user is unable to successfully create their own order.

Impact

User is unable to make orders

Code Snippet

https://github.com/sherlock-audit/2023-06-dinari/blob/4851cb7ebc86a7bc26b8d0d399a7dd7f9520f393/sbt-contracts/src/issuer/OrderProcessor.sol#L244-L264

Tool used

Manual Review

Recommendation

Do not get salt from user. Change the salt to keccak256(msg.sender)