Ayesha reported,

Utba had instructed his brother Saad, saying, "The son of Zamas slave-girl is mine, so take him into your custody."In the year of the Conquest, Saad took the boy and said, "He is my brother's son. My brother gave me instructions concerning him."Then Abd bin Zama stood up and said, "He is my brother and the son of my father's slave-girl, born on his bed."The two of them went together to the Prophet ﷺ.Saad said, "Messenger of Allah, he is my brother's son. My brother gave me instructions concerning him."Abd bin Zama said, "He is my brother and the son of my father's slave-girl, born on his bed."The Prophet ﷺ said, "He is yours, Abd bin Zama. The child belongs to the bed, and the adulterer gets the stone."Then he said to Sawda bint Zama, "Veil yourself from him," because of the resemblance to Utba that he saw in the boy. So the boy never saw her until he met Allah.

Bukhari 6749

Sahih

حدثنا عبد الله بن يوسف أخبرنا مالك عن ابن شهاب عن عروة

عن عائشة رضي الله عنها قالت

كان عتبة عهد إلى أخيه سعد أن ابن وليدة زمعة مني فاقبضه إليك فلما كان عام الفتح أخذه سعد فقال ابن أخي عهد إلي فيه فقام عبد بن زمعة فقال أخي وابن وليدة أبي ولد على فراشه فتساوقا إلى النبي ﷺ فقال سعد يا رسول الله ابن أخي قد كان عهد إلي فيه فقال عبد بن زمعة أخي وابن وليدة أبي ولد على فراشه فقال النبي ﷺ هو لك يا عبد بن زمعة الولد للفراش وللعاهر الحجر ثم قال لسودة بنت زمعة احتجبي منه لما رأى من شبهه بعتبة فما رآها حتى لقي الله

البخاري 6749صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Obligatory duties
Chapter
Child belongs to the bed, whether a free woman or a slave woman
Numbering
Darussalam 6749
Bukhari 6749