Just for the record: Mattel didn't buy CPHack, CPHack was not released under GPL (but under an home-made variation based upon the GPL - a so-called "crayon" license), and no attempt to "unlicense" the code was ever made.
Here is a brief rundown of what happened: Mattel claimed CPHack infringed on the copyright of Cyber Patrol 4, and threatened to sue. The programmers behind CPHack decided not to risk it in court, but voluntarily assigned the copyright of CPHack to Mattel on March 28th 2000, in return for not being sued for copyright violation and damages. It should be noted that Mattel's copyright infringement claim was never tried in court. If this claim had been put in front of a judge, I doubt that it would have prevailed.
After being assigned the copyright of CPHack, Mattel's lawyers started sending out legal threats (dubbed "spampoenas") to sites that mirrored CPHack. These did not say that the mirror sites infringed the CPHack copyright (now held by Mattel), but instead accused the mirror sites of acting "in concert with" the program's original authors. On September 27th 2000, the First Circuit Court of Appeals ruled that these legal threats could safely be ignored.
It should be noted that the license in question was a "crayon" license, not GPL, that there is no evidence that Mattel believed that holding the copyright of the code would permit it to be "unlicensed", and that nothing (except the bogus legal threats Mattel sent out to re-distributors) was ever tested in court. All this means is that the CPHack incident is not really a good example to to refer to if you want an answer to the question:
- Can anyone acquiring the rights to a free program "unlicense" it?
If we dismiss the CPHack incident as irrelevant, and try to answer this directly, I believe the answer is: No.
This is supported by the fact that such "unlicensing" has (AFAIK) never happened, and that Mattel's lawyers, in the CPHack case, did not try to "unlicense" the program. They did not even have this as plan B, when plan A (to prevent re-distribution of by alleging to re-distributors was "acting in concert" with the original developers), failed.
Someone that acquires the copyright of a free program can of course stop distributing the free version, and if they hold the sole copyright they can go on to create a non-free fork and distribute that as binary-only. But they can't "unlicense" the pre-fork copies that already exist. People will always be able to improve on, and continue to distribute, the free version.
I can only think of one thing that will make a court invalidate a free software license - and that is if the free software license is found to have never been valid.
A typical case would be that somebody got hold of the source code of a proprietary program (say the leaked source code of MS Word), and started to distribute a derivative work of this (perhaps somewhat disguised) as free software under GPL.
In such a case, the GPL is void. To distribute and license a derivative work you need to have permission from the original owner. If you don't have this permission, you can't distribute the derivative at all, nor are you allowed to stick your own license on it.