Unless you wrote that virus yourself and own the copyright, you start with committing copyright infringement.
Your explanation "the larger software community could benefit from developing solutions to tackle the virus" is rubbish. If that was your intention, then you would post a notice that you can make the source code available, and then give it to people who identify themselves and can demonstrate that they are trustworthy. What you are doing makes the source code available to every **** hacker in the world.
So DON'T DO IT. Whether it's legal or not, it is a stupid dick move. Everyone who could ever employ you for legal work will not be impressed one bit by this. Nobody needing to trust their employees will hire you. And especially in the USA, the biggest question is not whether it is legal, but whether someone is going to sue you. Anyone affected by this virus can claim that it happened because you published the code and take you to court, which will cost time and money even if there is no judgement against you.