I can just as easily mount a weapon to my car and drive around killing people. How is this any different?
[1] https://www.theverge.com/2017/7/7/15933554/george-hotz-hacki...
People are hacking on everything from micro-drones to full sized cars. Why single out this platform? Explosive on drones or automated weapons on cars could all be misused.
But to answer you questions about the legality all this - I don't know. Tesla and Uber are putting autopilots in their cars. Is that legal? Apparently, it is. Yet, those autopilots are already killing people. So expect a regulatory backlash, once enough people die.
I hope it won't take a massacre perpetrated by a buggy AI with a gun to get us there.