Submitted by KupiaSec, also found by dirk_y
https://github.com/GenerationSoftware/pt-v5-vault/tree/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/Vault.sol#L466-L469
https://github.com/GenerationSoftware/pt-v5-vault/tree/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/Vault.sol#L971-L974
https://github.com/GenerationSoftware/pt-v5-vault/tree/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/Vault.sol#L882-L887
Vault.mintWithPermit() uses a signature to approve the underlying asset. But the asset amount can be changed easily, so this method can be reverted and might be DoSd.
Vault.mintWithPermit() gets the share amount as an input and calculates the asset amount from the share. Then, it approves the asset amount with permit method.
The signature is generated using the exact value of the expected asset amount calculated from the share amount, and the resulting asset amount depends on the exchange rate of current vault.
The resulting asset amount can be different from the value of transaction start time. Even an adversary can front-run and manipulate the exchange rate. If the resulting asset amount is different from the original one, the signature will not work as expected and mintWithPermit() will revert in most cases.
We can input an upper bound of the asset amount instead of the exact value of the asset amount.
DoS
asselstine (PoolTogether) confirmed
PoolTogether mitigated:
Status: Mitigation confirmed. Full details in reports from dirk_y, rvierdiiev and 0xStalin.
