Doesn't that violates the GPL? I remember reading that it can't discriminate who can download the code... I know Sourceforge has to comply with US laws, but they still need to follow the GPL too.
No. The GPL says you have to give the source to anyone you give the binary to. If Sourceforge doesn't distribute a binary to anyone from those countries, they're in the clear.
On the other hand it means that if I give a GPLed binary to an Iranian, I can't satisfy the GPL just by saying "oh, the source is up on Sourceforge".