It is highly likely that with the modification paperwork you put yourself back on the hook for the mortgages. Without seeing the paperwork, it is impossible for me to say for certain, but for the vast majority, this is true. That being said, have you been served with the foreclosure lawsuit yet? If so, make sure that you read it carefully and provide an answer if you have any legal defenses. The complaint should clearly state if the bank is seeking a deficiency judgment or not (it is usually in one of the later paragraphs of the complaint). Good Luck!
If it was a straight modification of the original loan, then you would not be on the hook for the modified loan unless you reaffirmed the debt in your bankruptcy case. If what you did was a refinance of the original loan, and not a true modification, then you would be personally liable for the mortgage since it was a new debt incurred after your bankruptcy was filed. Check you paperwork to see which category you fall under.
We understand your concern. In most loan modifications you are not actually reaffirming the loan commitment, meaning that you are not still on the hook for the balance due on the unpaid loan. The loan was discharged in your Chapter 7 bankruptcy.
This is general legal information, not intended to apply to your specific case. And I may not be licensed to practice in your particular state. Under Federal Law, I am a debt relief agent.
If you did a refinancing and took on a new note, then you will be responsible for the deficiency after the sale of the property. However, there are ways to prevent this. You can seek a short sale agreement with the lender. The lender also may be willing to accept a "deed in lieu" of foreclosure which is another way to get off the hook on the deficiency. If you are one of the fortunate few, you may also sell the house for the value of the loan or more in which case the collateral (your home) repays the debt and you have no personal liability. There are also litigation avenues you can try such as seeing what defenses you can raise to the foreclosure action. In sum, as the other attorneys who have answered your question have already stated, there is no way for us to know for sure if you are "on the hook" because we do not have the loan documents. However, even if you are "on the hook", you still have options.
Best of luck and I hope these answers have been helpful to you.
This answer is offered as a public service for general information only and may not be relied upon as legal advice. No attorney-client relationship is created or is intended to be created hereby.