Buffett, who stepped down as Berkshire Hathaway's chairman in September, said the gift will be directed to four foundations.