ʿUtba bin Abu Waqqas took a firm promise from his brother Saʿd bin Abu Waqqas to take the son of the slave-girl of Zamʿa into his custody as he was his (i.e. ʿUtba's) son. In the year of the Conquest (of Mecca) Saʿd bin Abu Waqqas took him, and said that he was his brother's son, and his brother took a promise from him to that effect. 'Abu bin Zamʿa got up and said, "He is my brother and the son of the slave-girl of my father and was born on my father's bed." Then they both went to the Prophet ﷺ Saʿd said, "O Messenger of Allah ﷺ! He is the son of my brother and he has taken a promise from me that I will take him." 'Abu bin Zamʿa said, "(He is) my brother and the son of my father's slave-girl and was born on my father's bed." Messenger of Allah ﷺ said, "The boy is for you. O 'Abu bin Zamʿa." Then the Prophet ﷺ said, "The son is for the bed (i.e. the man on whose bed he was born) and stones (disappointment and deprivation) for the one who has done illegal sexual intercourse." The Prophet ﷺ told his wife Sauda bint Zamʿa to screen herself from that boy as he noticed a similarity between the boy and ʿUtba. So, the boy did not see her till he died. (Using translation from Bukhārī 2053)
أَخِي وَابْنُ وَلِيدَةَ أَبِي وُلِدَ عَلَى فِرَاشِهِ فَأَتَيَا رَسُولَ اللَّهِ ﷺ فَقَالَ سَعْدٌ يَا رَسُولَ اللَّهِ أَخِي كَانَ عَهِدَ إِلَيَّ فِيهِ وَقَالَ عَبْدُ بْنُ زَمْعَةَ أَخِي وَابْنُ وَلِيدَةَ أَبِي وُلِدَ عَلَى فِرَاشِهِ فَقَالَ رَسُولُ اللَّهِ ﷺ «هُوَ لَكَ يَا عَبْدُ بْنَ زَمْعَةَ الْوَلَدُ لِلْفِرَاشِ وَلِلْعَاهِرِ الْحَجَرُ» ثُمَّ قَالَ رَسُولُ اللَّهِ ﷺ لِسَوْدَةَ بِنْتِ زَمْعَةَ «احْتَجِبِي مِنْهُ» لَمَّا رَأَى مِنْ شَبَهِهِ بِعُتْبَةَ فَمَا رَآهَا حَتَّى لَقِيَ اللَّهَ