code-423n4 / 2023-01-drips-findings

0 stars 2 forks source link

Modifiers lacks check-effect-interact patters on sensitive state changing variables #181

Closed code423n4 closed 1 year ago

code423n4 commented 1 year ago

Lines of code

https://github.com/code-423n4/2023-01-drips/blob/main/src/DripsHub.sol#L118

Vulnerability details

Impact

Proof of Concept

Github

    modifier onlyDriver(uint256 userId) {
        uint32 driverId = uint32(userId >> DRIVER_ID_OFFSET);
        _assertCallerIsDriver(driverId);
        _;
    }

Tools Used

Manual

Recommended Mitigation Steps

c4-judge commented 1 year ago

GalloDaSballo marked the issue as unsatisfactory: Invalid

GalloDaSballo commented 1 year ago

This modifier is exactly only doing CE of CEI