Rustproofing problem are going to cost Toyota $3.4 billion (3.1 billion euros) in the United States.
The Japanese carmaker has agreed to a settlement in a federal class action suit brought by some US owners of three models of pickups and sports utility vehicles.
Allegedly the Tacoma, Tundra and Sequoia received inadequate rust protection that could lead to corrosion serious enough to jeopardise their structural integrity.
Under the settlement terms, Toyota has to inspect 1.5 million vehicles for 12 years from the day they were first sold or leased and pay for replacing any badly rusted frames.
The company admitted no liability or wrongdoing in the proposed settlement.
The settlement covers Tacoma trucks from the model years 2005 through 2010, Sequoias from 2005 through 2008 and Tundras from the 2007 and 2008 model years.