A servant sold by the court can be given a Canaanite slave woman to have children.
Even today, there is a way for a mamzer (illegitimate) to have kosher children from a Canaanite slave woman.
Art: Seated Man with a Youth & a Servant in an Interior by Michael Sweerts