As Bank of America (BAC 1.70%) watchers well know, the big bank has been using a wide broom to tidy up its Countrywide mess, and it just recently settled with Freddie Mac (FMCC 3.41%) over a slew of bad mortgages it sold to the government-sponsored entity prior to the financial crisis. But have hope. The end is near.

Several days ago, another settlement was approved by a judge, and Bank of America will pay institutional investors, such as the Maine and Iowa state retirement systems, $500 million to settle that case. This deal covered a huge hunk of mortgage-backed securities gone bad -- 429 of them -- and the settlement prompted Bank of America to note that the bank is now 75% finished with its legacy Countrywide mortgage problems.

While this is technically true, there are a few pesky issues still simmering for the bank, any or all of which could cause Bank of America's liability to soar.

Three-quarters done, if all goes according to plan
The $500 million settlement, which came out of a lawsuit originally filed in 2007, had already been agreed to, and Bank of America had put money aside to complete the deal -- unlike the case with Freddie Mac, where the settlement funds came out of the bank's legal reserves. The bank noted in its latest 10Q filing that, out of an original principal balance of Countrywide loans totaling $716 billion, only $179 remains outstanding.

Great work, but the 75% of legacy loans considered "done" included the $500 million settlement, as well as another, larger one -- which encompasses 530 MBSes representing $409 billion of the original principal balance. That settlement, struck in 2011 between Bank of America and 22 institutional investors, was recently reopened, and a judge is currently mulling over whether or not the $8.5 billion settlement amount will be upheld. If not, the parties may have to go back to the negotiating table -- a scenario that doesn't bode well for B of A.

Unfortunately, that's not the extent of the bank's pending legal worries. Bank of America also has a looming issue with its stable of home equity lines of credit, many of which were set up during the pre-crisis days of sloppy lending practices. As these loans turn 10 years old, borrowers will face a huge jump in their monthly payment requirements, which will now include principal payments along with the interest-only payments. In a disturbing portent of things to come, Helocs of 2003 vintage are already experiencing a high rate of defaults.

Then there is the smoldering issue of Federal Housing Administration loans. These mortgages, of which Bank of America holds the biggest bucket, may or may not be insured by the FHA -- depending upon things such as whether or not banks have been found to have engaged in fraudulent behavior regarding those loans. Considering Bank of America's track record in that regard, these loans could cause a whole load of trouble for the bank.

Next year could be tougher for Bank of America
As far as the $8.5 billion settlement case is concerned, the judicial approval of the $500 million deal may be a good omen. The judge found in favor of the settlement despite the objections of 37 of the parties involved, calling the deal "fair, reasonable, and adequate."

In the other case, many of the early objectors have dropped their opposition, with megainsurer AIG (AIG -0.04%) currently one of the most tenacious of the objectors. The insurer may have an ulterior motive in keeping up its objections, though, having to do with a $10 billion lawsuit it filed against B of A back in 2011, alleging misrepresentation of the quality of MBSes purchased by AIG between 2005 and 2007. A ruling against the $8.5 billion deal could be valuable to the insurer as it pursues the other suit against the bank.

As for the Heloc and FHA loan issues, time will tell whether those loans turn out to be additional handicaps for the bank. Despite the bank's best efforts, it seems, the end of the dark tunnel that is Countrywide still remains just out of sight.