(1) A service member may waive any of the rights and protections provided by this chapter. In the case of a waiver that permits an action described in subsection (2) of this section, the waiver is effective only if made pursuant to a written agreement of the parties that is executed during or after the service member's period of military service. The written agreement shall specify the legal instrument to which the waiver applies and, if the service member is not party to that instrument, the service member concerned.
(2) The requirement in subsection (1) of this section for a written waiver applies to the following: (a) The modification, termination, or cancellation of a contract, lease, or bailment; or an obligation secured by a mortgage, trust, deed, lien, or other security in the nature of a mortgage; and (b) the repossession, retention, foreclosure, sale, forfeiture, or taking possession of property that is security for any obligation or was purchased or received under a contract, lease, or bailment.