Ayesha reported,

Saad bin Abu Waqqas and Abd bin Zama disputed over a boy.Saad said, "Messenger of Allah ﷺ, this is the son of my brother Utba bin Abu Waqqas. He entrusted to me that this boy is his son. Look at the resemblance."Abd bin Zama said, "This is my brother, Messenger of Allah. He was born on my father's bed from his slave-girl."The Messenger of Allah ﷺ looked at the boy and saw a clear resemblance to Utba. He said, "He is yours, Abd bin Zama. The child belongs to the bed, and the adulterer gets the stone. And you, Sawda bint Zama, veil yourself from him."So she never saw him after that.In another narration there is an addition, "He is your brother, Abd."

Azami 6264

Sahih

عن عائشة قالت

اختصم سعد بن أبي وقاص وعبد بن زمعة في غلام فقال سعد: هذا يا رسول الله ﷺ ابن أخي عتبة بن أبي وقاص عهد إلي أنه ابنه. انظر إلى شبهه، وقال عبد بن زمعة: هذا أخي يا رسول الله ولد على فراش أبي من وليدته. فنظر رسول الله ﷺ إلى شبهه فرأى شبها بينا بعتبة فقال: هو لك يا عبد بن زمعة، الولد للفراش، وللعاهر الحجر واحتجبي منه يا سودة بنت زمعة فلم تره قط، وفي رواية زيادة: هو أخوك يا عبد.

الأعظمي 6264صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Marriage
Chapter
Marriage and its conditions
Section
Attributing the child to the marriage bed if its owner does not disown him
Numbering
Jami al-Kamil 6264 (2nd edition)
Azami 6264