As with nearly everything in the legal world, the devil is in the details.

Suppose I release something under an open source license. You grab a copy and start using it in accord with that license. You are copying it, making derivative works, and distributing copies of the original and/or your derivative works.

Alice gets one of those copies from you. Alice wants to distribute copies and derivative works, so she also needs a license. Who can give her a license?

She got the software from you, so maybe you can give her a license. With some licenses, you can. The MIT license, for example, specifically says you can sublicense. Unfortunately, some popular free/open licenses do not allow sublicensing. If the software is under one of those, Alice will have to get her license from me.

So suppose that after you received your license, I announced that I am no longer giving out any new licenses. If Alice gets her copy from you after that, we are in interesting territory. You've got a license, so I think you are probably safe to continue distributing the software, although again, the devil will be in the details. Let's make it simple and assume the license said it was irrevocable so we don't have to worry about your license.

Since Alice did not get a copy until after I had announced I would no longer grant licenses, my position when I sue Alice for copyright infringement will be that my putting the software up under an open source license was an offer to form a licensing contract with anyone who obtained the software, where acceptance of the offer and contract formation occurs when someone obtains the software. Offers usually can be withdrawn before acceptance, and that's what I did.

Maybe the license agreement you have with me can help Alice. If the license said that you could distribute the software and the recipients received a license from me, then you might be able to sue me claiming that by not giving Alice a license I am in breach of the contract between you and me. That will be an interesting case.

If you do win, that's not the end of the interesting and fun arguments. The court will have to fashion a remedy for you. Will they order me to give Alice a license? Or will they limit you to collecting damages? If the former, do I just have to license it to people who like Alice get it from people who got licenses from me before I stopped giving new licenses, or do I have to license it to people who get it from Alice later? If the court goes for damages, it will be fun to try to figure out the monetary damages of me not licensing your recipients to modify and redistribute the code.

Unfortunately, not many free/open licenses actually state they are irrevocable. The Apache 2 license does. It also says that you can sublicense. This seems pretty safe. People who receive the software before a revocation attempt are covered by the irrevocability, and people afterward can be covered by a sublicense from someone in the first group.

GPLv3 also says that it is irrevocable. However, it quite adamantly insists that you cannot sublicense it. It instead explicitly says that when you copy a GPLv3 program the recipient automatically receives a license from the original licensors. This is not as good as Apache. It's basically the situation I describe in the Alice hypothetical.

The MIT license says you can sublicense, but does not say it is irrevocable. Also not as good as Apache. If my software is MIT license, I might be able to revoke the license I gave you, but Alice might be safe as she got her license as a sublicense from you. (Whether or not a court might find an implicit irrevocability clause in a license is yet another interesting issue that will come up should someone try to revoke one of these licenses).

Sadly, many licenses mention neither irrevocability nor sublicensing. GPLv2 goes even farther into risky territory, not saying it is irrevocable and explicitly disallowing sublicensing.