CollateralManager#commitCollateral can be called on an active loan
CollateralManager#commitCollateral never checks if the loan has been accepted allowing users to add collaterals after which can DOS the loan.\\nCollateralManager.sol#L117-L130\\n```\\nfunction commitCollateral(\\n    uint256 _bidId,\\n    Collateral[] calldata _collateralInfo\\n) public returns (bool validation_) {\\n    address borrower = tellerV2.getLoanBorrower(_bidId);\\n    (validation_, ) = checkBalances(borrower, _collateralInfo); <- @audit-issue never checks that loan isn't active\\n\\n    if (validation_) {\\n        for (uint256 i; i < _collateralInfo.length; i++) {\\n            Collateral memory info = _collateralInfo[i];\\n            _commitCollateral(_bidId, info);\\n        }\\n    }\\n}\\n```\\n\\nCollateralManager#commitCollateral does not contain any check that the bidId is pending or at least that it isn't accepted. This means that collateral can be committed to an already accepted bid, modifying bidCollaterals.\\n```\\nfunction _withdraw(uint256 _bidId, address _receiver) internal virtual {\\n    for (\\n        uint256 i;\\n        i < _bidCollaterals[_bidId].collateralAddresses.length();\\n        i++\\n    ) {\\n        // Get collateral info\\n        Collateral storage collateralInfo = _bidCollaterals[_bidId]\\n            .collateralInfo[\\n                _bidCollaterals[_bidId].collateralAddresses.at(i)\\n            ];\\n        // Withdraw collateral from escrow and send it to bid lender\\n        ICollateralEscrowV1(_escrows[_bidId]).withdraw(\\n            collateralInfo._collateralAddress,\\n            collateralInfo._amount,\\n            _receiver\\n        );\\n```\\n\\nbidCollaterals is used to trigger the withdrawal from the escrow to the receiver, which closing the loan and liquidations. This can be used to DOS a loan AFTER it has already been filled.\\nUser A creates a bid for 10 ETH against 50,000 USDC at 10% APR\\nUser B sees this bid and decides to fill it\\nAfter the loan is accepted, User A calls CollateralManager#commitCollateral with a malicious token they create\\nUser A doesn't pay their loan and it becomes liquidatable\\nUser B calls liquidate but it reverts when the escrow attempts to transfer out the malicious token\\nUser A demands a ransom to return the funds\\nUser A enables the malicious token transfer once the ransom is paid
CollateralManager#commitCollateral should revert if loan is active.
Loans can be permanently DOS'd even after being accepted
```\\nfunction commitCollateral(\\n    uint256 _bidId,\\n    Collateral[] calldata _collateralInfo\\n) public returns (bool validation_) {\\n    address borrower = tellerV2.getLoanBorrower(_bidId);\\n    (validation_, ) = checkBalances(borrower, _collateralInfo); <- @audit-issue never checks that loan isn't active\\n\\n    if (validation_) {\\n        for (uint256 i; i < _collateralInfo.length; i++) {\\n            Collateral memory info = _collateralInfo[i];\\n            _commitCollateral(_bidId, info);\\n        }\\n    }\\n}\\n```\\n