Question: how long do you need on your passport to go to canada?
Answer: Because Canada doesn't have a strict six month rule, just a requirement that your passport be valid through your entire visit, it seems highly unlikely that you'd be turned away from entering the country because your passport is expiring five months later.