I heard the Messenger of Allah ﷺ say, "The child belongs to the marriage bed, and for the adulterer is the stone."
حدثنا محمد بن جعفر حدثنا شعبة عن محمد بن زياد قال سمعت
سمعت رسول الله ﷺ يقول الولد لصاحب الفراش وللعاهر الحجر
Its isnad is sahih. It has already appeared at 173 and elsewhere. See also 8981.