A judge Friday tentatively approved a proposed settlement of lawsuits against Sony BMG Music Entertainment that would give millions of consumers free music downloads to compensate them for flawed software on CDs.

U.S. District Judge Naomi Reice Buchwald gave her approval after a hearing in which lawyers explained the deal that requires the world’s second-largest music label to stop manufacturing compact discs software that can leave computers vulnerable to hackers.