The Prophet ﷺ addressed them while mounted on his she-camel. The camel was chewing her cud, and her foam was flowing down between her shoulders. He said, "Allah has allotted to every heir his rightful share of the inheritance, so a bequest in favor of an heir is not permitted. The child belongs to the marital bed, and the adulterer gets the stone. Whoever claims descent from someone other than his father, or attaches himself as a freed slave to other than his rightful patrons, upon him is the curse of Allah, the angels, and all people. No obligatory worship nor voluntary act will be accepted from him," or he said, "no voluntary act nor obligatory worship."
حدثنا أبو بكر بن أبي شيبة حدثنا يزيد بن هارون أنبأنا سعيد بن أبي عروبة عن قتادة عن شهر بن حوشب عن عبد الرحمن بن غنم
أن النبي ﷺ خطبهم وهو على راحلته وإن راحلته لتقصع بجرتها وإن لغامها ليسيل بين كتفي قال إن الله قسم لكل وارث نصيبه من الميراث فلا يجوز لوارث وصية الولد للفراش وللعاهر الحجر ومن ادعى إلى غير أبيه أو تولى غير مواليه فعليه لعنة الله والملائكة والناس أجمعين لا يقبل منه صرف ولا عدل أو قال عدل ولا صرف
[Its isnad is hasan] Tirmidhi narrated it in the chapters on bequests, in the chapter "There is no bequest for an heir," hadith no. 2121, from the hadith of Qatada with this wording, and he said, hasan sahih. Nasai also narrated it, 6/247, hadith no. 3672, via the route of Shubah from Qatada with this wording.