Submitted by kenzo
Senses redeem can be totally DOSd due to user supplied input.
Using this attack, Sense market can not be redeemed.
This is how Sense market is being redeemed:
The problem is that d is user supplied input and the function only tries to redeem the amount that was transferred from Lender.
A user can supply malicious d contract which does nothing on redeem(o, m, amount).
The user will then call Redeemers redeem with his malicious contract.
Redeemer will transfer all the prinicipal from Lender to itself, will call d (noop), and finish.
Sense market has not been redeemed.
Now if somebody tries to call Sense markets redeem again, the amount variable will be 0, and Redeemer will try to redeem 0 from Sense.
All the original principal is locked and lost in the contract,
like tears in rain.
I think you should either use a whitelisted Sense address, or send to ISense(d).redeem Redeemers whole principal balance.
sourabhmarathe (Illuminate) confirmed
