score:4
A person entering Canada at a land border (with the US, of course) would simply be returned to the US. There is no requirement for detention. An exception would be if the person claimed asylum at the border crossing. Canada does have immigration detention centres, subject to the Immigration and Refugee Protection Act 2001.
In the United States, visas and entry clearance can have different expiry dates. Assuming the referenced expiry means that the person is no longer permitted to remain in the country (known as "out of status"), should US immigration authorities become aware, the deportation process may include detention at an ICE detention center.
If a person was already in Canada and attempted to cross the land border into the US without valid immigration status, they would be refused entry and returned to Canada.
Though the information is unverified, this forum thread suggests that Canadian immigration officials will ask about an overstay in the US. An overstay in Canada, as the OP points out, is likely to affect any future application for entry clearance to Canada, even if a visa is not normally required.