The Senate overwhelmingly approved legislation on Thursday that is meant to stabilize the housing market.