Yes, blanket clemency is allowed under US Law
The legal definition of a class is a group of persons or things, taken collectively, having certain qualities in common, and constituting a unit for certain purposes. The legal definition of discrimination is the unfair treatment of a person who is a member of a protected class.
Although race is a protected class, it does not apply to presidential pardons because presidential pardons are a constitutional power, and protected classes are legislative rights. Schick v. Reed concluded that an exercise of clemency may include "any condition which does not otherwise offend the Constitution". Since the constitution only says the president cannot pardon an impeachment, he has every right to pardon in ways that violate rights that are only protected by legislation.
Furthermore, there is already a precedent for blanket clemency which is the use of this power to forgive a class of people of their crimes. Jimmy Carter, Gerald Ford, James Madison, Andrew Johnson, Harry Truman, John Kennedy, Donald Trump, and Joe Biden have all excrosised blanket clemency making it a well established practice.
Of these, the most notable are 3 pardons that were not for specific crimes, but groups of people. Madison pardoned all of the Baratarian Pirates of all past crimes in recognition for their contribution to the war of 1812. And in the past few months 2 new cases have emerged. On 12/12/24 Biden commuted the sentences of nearly 1500 people who were home incarceration during the COVID-19 pandemic with little regard for their specific crimes. And on 1/20/25 Trump pardoned about 1500 people for a wide range of crimes based on their connections to the 2021 insurrection. After a long process of assessing specific accusations Trump was reported to have said "Fuck it: Release them all", a clear, though vulgar declaration to treat them as a class regardless of their exact crimes. Since the presidents of both major parties have pardoned people as a class back to back, it is unlikely that either party plans to move against this practice.
The blanket pardons by Gerald Ford, Jimmy Carter, and Andrew Johnson were also notable because they proved that a president can blanket pardon a class without naming the individuals who they are pardoning.
So, there is certainly grounds to say that the president is not only allowed to pardon based on race, but that he can pardon an entire class of people all at once based purely on what they have in common while doing it.
But he can only pardon federal criminals
Presidential pardons can only be applied to federal crimes meaning that this order can not release the close to 1 million white people in jails and prisons who are there for State crimes. This executive order would only apply to about 50,000 prisoners nationwide.
The pardon can not be overturned, but its execution can be hampered in many ways due to its lack of clarity.
Unless the president specifically names every white prisoner in his pardon, there will be a lot of room for other entities to stand in the way of the order.
Pardoning that many undefined people will require the creation of a special team to identify all the white people in federal prisons and process their releases; so, Congress could refuse to fund such a project such that most white people would remain in custody despite their pardon because no one is able to identify who they are. For example, in 1865, Congress passed An Act that set the salary for "Pardon Clerks" in the United States; so, Congress could use this ability again to defund the federal government from being able to pay anyone to manage and oversee the releases. With about 150,000 federal prisoners to sort through, creating a workforce that could process who should and should not be released would be difficult without any money to fund it.
If congress says that Pardon Clerks may not collect a salary, then this would prevent any federal employees from processing the releases and prevent the government from hiring people to do the work. This means the president would have to jump through some hoops to establish a volunteer workforce to get it done.
Again, if this order does not define who these white prisoners are, the Courts could further hold up this order by challenging the definition of "white". Because current federal laws prevent discrimination based on race, current laws make defining race very difficult. Do you go off of census data? How they were filed when they were arrested? What they self-identified as when they applied for college scholarships, or when taking their flu shots? If the order say "all white people" instead of listing everyone out who the president has determined on his own to be white, the lack of clarity in the order would give the Courts reason to file a temporary injunction until such point that a practice for establishing whiteness can be properly defined.
The prisons themselve may also establish intentionally complicated exit paperwork required to prove race that would simply be too complex for a small force of poorly trained volunteers to understand and file properly and in a timely manner.
Lastly, presidential clemency does not automatically expunge a person's record or fully pardon an offense. What it does is it relieves a person of punishments for their crimes. So, depending on the wording of the pardon, it may be possible to place strict parole, tracking, and/or house arrest requirements on the released convicts making re-arresting them under new charges relatively easy. It would even be possible in many cases for inmates to be extorted or threatened into rejecting the pardon, if the terms of their release are worse than completing their sentence or they the are adequately scared, many may choose to reject it out of self preservation as was allowed in United States v. Wilson when an inmate rejected a pardon to avoid getting lynched.
So, if enough people in enough positions of power decide to use their authority to undermine the presidential order, the number of white people that actually get release by this order might actually be very small.