Actually it's not. hence the use of reference checks with managers - there would be little reason to talk to an potential employee's manager other than to talk about their job performance. As an FYI, here's a link to the Government of Canada's website on Structured Reference Checks - Structured reference checks. In that document on page 6 of the .pdf file in a section called "What types of questions to ask?" states -
If it was illegal, the Government of Canada would not be instructing their staff to do in a document that is easily available on the internet.Questions about developmental needs. In order to bypass the reluctance sometimes expressed by referees to report unfavourable information about an applicant, questions on developmental needs can be asked. For example, “Are you aware of any areas that could be developed in relation to the competency?” might be asked. By emphasizing that “even the strongest applicants have improvement areas”, referees are typically more comfortable providing statements in this area. Nonetheless, questioning about more sensitive information, such as potentially-inappropriate work-related behaviour, should occur later in the interview, once sufficient rapport has been reached between the referee and the reference checker.
What has been happening in the US, not necessarily in Canada, is employers are instructing their managers not to give references, not because it's illegal, but because it may open the company up to lawsuits from the employee's new employer IF something disclosed wasn't what it was - ie said employee was wondering and hard working when in fact they were always late for work and never got anything done.