The Prophet ﷺ said, "The child belongs to the bed, and for the fornicator is the stone."
حدثنا عبد الرزاق حدثنا معمر عن الزهري عن ابن المسيب وأبي سلمة
أن النبي ﷺ قال الولد للفراش وللعاهر الحجر
Its isnad is sahih, and it is a repetition of 7261.