Senate leaders reached a deal to advance long-stalled legislation giving companies legal protections for voluntarily sharing information about hacking threats with the U.S. government and each other.

Under the deal unveiled Wednesday, the Senate will vote on as many as 21 amendments largely intended to increase privacy protections and help ensure the bill, S.754, doesn't create a new government surveillance program.

The votes will be held at a time to be determined after the Senate returns to Washington in September from a recess. The amendments process will help determine whether the bill ultimately has enough votes to pass.