Contrary to what many Americans believe, all guns are not illegal in Canada. Until recently, those guns that are legal needed to be registered, and I think purchasers are subject to a more extensive background check than here. From what I've read at our Canadian sister site, Free Dominion, the gun registry in Quebec was/is run by Quebec, not the Canadian federal government.
The shooter's 3 guns were legal and properly registered in accordance with Canadian firearms laws. A lot good that did.
Thanks for the correction.