Ayesha reported,

Abu Huzaifa bin Utba bin Rabia bin Abd Shams, who was among those who fought at Badr with the Prophet ﷺ, adopted Salim as his son and married him to his niece Hind bint Walid bin Utba bin Rabia. Salim was the freed slave of a woman from the Ansar, just as the Prophet ﷺ had adopted Zayd. In the days of ignorance, when a man adopted another man, people would call the adopted man by his name, and he would inherit from his estate, until Allah revealed "Call them by the names of their fathers" up to His words "and your freed slaves" [Ahzab 33:5]. So they were traced back to their own fathers, and anyone whose father was not known became a freed slave and a brother in faith.Then Sahla bint Suhayl bin Amr, of Quraysh and of the clan of Amir, who was the wife of Abu Huzaifa bin Utba, came to the Prophet ﷺ and said, "Messenger of Allah, we used to regard Salim as our son, and now Allah has revealed concerning him what you know."And the rest of the hadith follows.

Bukhari 5088

Sahih

حدثنا أبو اليمان أخبرنا شعيب عن الزهري قال أخبرني عروة بن الزبير

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

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

البخاري 5088صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Marriage
Chapter
Equals in religion
Numbering
Darussalam 5088
Bukhari 5088