In Shemot, chapter 21 verse 4, we learn that a master can give his Jewish slave a Canaanite slavewoman to bear the master slave children:
If his master gives him a wife, and she bears him sons or daughters, the woman and her children shall belong to her master, and he shall go out alone.
Rashi says that this verse could only refer to a Canaanite slavewoman.
Then in Devarim, chapter 7 verse 3, we learn:
You shall not intermarry with them; you shall not give your daughter to his son, and you shall not take his daughter for your son.
The two verses seem to contradict each other. Do we say that in the case of a Jewish slave, there is an exception where he is permitted to have relations with the Canaanite woman?