By abusing the NSA’s mass surveillance data, the FBI may have violated the rights of millions of Americans, a federal judge ruled.