Yes, it'd be legal
Intelligence both defines human experience and improves it. More intelligence would allow people to enjoy/experience life more, rapidly advance technology including medicine, increase humanity's odds of surviving longer, etc..
All else equal, attempting to ban something that increases human intelligence would be a crime against humanity in just about every conceivable sense. Any conspiracy to ban such a drug would be a conspiracy against humanity itself; there're very few people depraved enough to engage in such an atrocity.
Even sociopaths wouldn't try to ban it
You'll sometimes hear conspiracy theories about how there is such a drug, but alleged power-hungry sociopaths are keeping it under wraps for their own gain.
Of course, in real life, everyone would benefit from humanity as a whole being much smarter. Examples:
Everyone's going to need a doctor some day. Wouldn't you want your doctor to be smarter?
That doctor's going to try to help you with medical technology. Wouldn't you prefer for that medical technology to be more advanced?
You probably like gadgets like computers and smart phones. Wouldn't you like them to be far more advanced?
You probably like material wealth. Wouldn't you like to have even more of it?
Want to go to Mars? It'll happen faster if our scientists/engineers are smarter.
Some ecological disaster's threatening to destroy the planet! Wouldn't you prefer for the people who try to stop it to be smarter?
In short, even a sociopath who cares only about themself wouldn't want to prevent others from having the drug. And non-sociopaths would certainly love to see the world become a better place, both for themself and others. It'd take a truly spiteful person who would accept personal suffering just to see others also suffer to oppose such a wonder drug.