I understand your upset and shocked at what happened and know you have explained to him that no one is allowed to touch his privates, but in may have been in a moment of madness. You also mentioned that it happened to another boy, perhaps he saw it happen to other boy and getting carried away in the moment wasn't thinking. In no way am i condoning it's ok for it to happen, more just trying to think of why he did it.
Also even though he should've known better, he's only six and kids of that age tend to think second by second, without any sort of idea about the consequences of their actions. Try and not be angry with your son, however i'd make sure your son doesn't have any contact with the girl who did this and keep reinforcing the 'no touching/anyone touching you' message and make sure you keep an extra eye on him for a while (which i'm sure you already do).
he no's people shud never touch his parts thats why he told me,i was speachless i gave him rong then dragged him to the girls house to tell her mam ans she was speachless,i just feel very disgusted in him i carnt even luk at him i carnt stop crying nd i no i shouldnt be like that.im going to have a chat with him tomorro to see wat else they wer doing.a little girl shud not no anything about that it makes me sick.
I would say you keep him around here you can see him, supervision needed here, the firend could do with being changed aswell, it makes you think where had the 5 year old girl seen this behavior , I would think the mom wasnt too happy, so keep him where you can see him and not with these children , also have a talk to him about things he cannot do.