The Mortgage Debt Relief Act of 2007 allows taxpayers to exclude income from the discharge of debt on their principal residence.
Debt reduced through mortgage restructuring, as well as mortgage debt forgiven in connection with a foreclosure, qualifies for the relief.
Source: IRS.GOV



