Yes. You keep paying rent to whomever is the owner. Unless and until a trustee's sale actually takes place, you continue to pay rent to your current landlord.
The Protecting Tenants at Foreclosure Act of 2009 (PTFA), part of the Helping Families Save Their Homes Act of 2009 (Public Law 111-22, approved May 20, 2009), requires that tenants residing in foreclosed residential properties be provided notice to vacate at least 90 days in advance of the date by which the immediate successor, generally, the purchaser, seeks to have the tenants vacate the property. Except where the purchaser will occupy the property as the purchaser's primary residence, the terms of any bona fide lease also remain in effect.
The information presented here is general in nature and is not intended, nor should be construed, as legal advice. This posting does not create any attorney-client relationship with the author (who is only admitted to practice law in the State of California). For specific advice about your particular situation, consult your own attorney.
I agree with Mr. Chen. You are obligated to pay the rents to the landlord as long as you reside there. Contact HUD and notify them of the problem so you are not caught off guard. However, you should have at a minimum 90 days after the foreclosure sale to move. Starting the process of looking for a new place sooner than later will save you a lot of heart ache.
This answer in no way creates an attorney-client relationship. The answer is not a complete answer and requires additional facts in order to provide the best options. The submitter accepts the risk of relying on such an incomplete answer and waives any claims of damages for doing so. As stated in the answer the submitter should contact a qualified bankruptcy attorney is discuss these issues further before any action is taken. Any action taken without advise and counsel of a qualified attorney is inadvisable.