Abu Huzaifa bin Utba bin Rabia bin Abd Shams, who was among those who fought at Badr with the Prophet ﷺ, adopted Salim and married him to his niece Hind bint Walid bin Utba bin Rabia. Salim was the freed slave of a woman of the Ansar. This was just as the Prophet ﷺ had adopted Zayd. In the days before Islam, when a man adopted another, people would call the adopted son by his name and he would inherit from his estate, until Allah revealed, "Call them after their fathers, that is more just in the sight of Allah. And if you do not know their fathers, then they are your brothers in faith and those under your care" [Ahzab 33:5]. So they were traced back to their own fathers, and whoever had no known father became a client 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 already know."And he went on to mention the rest of the hadith.
أن أبا حذيفة بن عتبة بن ربيعة بن عبد شمس- وكان ممن شهد بدرا مع النبي ﷺ- تبنى سالما، وأنكحه بنت أخيه هند بنت الوليد بن عتبة بن ربيعة، وهو مولى لامرأة من الأنصار، كما تبنى النبي ﷺ زيدا، وكان من تبنى رجلا في الجاهلية دعاه الناس إليه، وورث من ميراثه، حتى أنزل الله: {ادعوهم لآبائهم هو أقسط عند الله فإن لم تعلموا ءاباءهم فإخوانكم في الدين وموليكم} فردوا إلى آبائهم، فمن لم يعلم له أب كان مولى وأخا في الدين، فجاءت سهلة بنت سهيل بن عمروالقرشي، ثم السامري- وهو امرأة أبي حذيفة بن عتبة- إلى النبي ﷺ فقالت: يا رسول الله! إنا كنا نرى سالما ولدا، وقد أنزل الله فيه ما قدعلمت. فذكر الحديث.