Freddie Mac and Bank of America are in settlement talks to resolve disputes over more than $1.4 billion in faulty mortgages Freddie has said Bank of America should have to take back, according to people familiar with the matter.

The deal would be the second such agreement between Bank of America and Freddie since 2011. It would largely shield the bank from any future repurchase demands from Freddie stemming from loans sold before...