What is mortgage default swap?

I think what you are referring to is basically a credit default swap. This is a kind of insurance that the lender of the loan or the mortgage can purchase in order to ensure that the re-payment on the loan will be made in the event that the borrower defaults on the payment. This protects the back and spreads the risk.