Submitted by AkshaySrivastav, also found by bin2chen
The CashManager contract contains setEpochDuration function which is used by MANAGER_ADMIN role to update the epochDuration parameter.
The result of the setEpochDuration function execution can be impacted any external agent. The epochDuration is a crucial parameter of CashManager contract which determines the length of epochs in the contract.
The issue here is that the setEpochDuration function updates the epochDuration value without invoking the transitionEpoch function first. 
This leads to two different end results and scenarios:
In these two different cases, the duration and epoch number of last few passed epochs can be impacted differently. The result becomes dependent upon the wish of the external agent.
The exact impact is demonstrated in the PoC below.
New test cases were added to forge-tests/cash/cash_manager/Setters.t.sol file.
The transitionEpoch function should be executed before executing the setEpochDuration function so that the values for passed epochs are recorded in a consistent way. This can be done by adding the updateEpoch modifier.
ali2251 (Ondo Finance) confirmed
ypatil12 (Ondo Finance) resolved
