The Prophet (peace and blessings be upon him) said:
"The child belongs to the (husband who owns the) bed, and for the fornicator there is the stone."
Hadith Referenceصحیح الجامع الصغیر / حرف الواو / 7161
Hadith Gradingالألبانی:صحيح
Hadith Takhrij[ق د ن هـ] عن عائشة [حم ق ت ن هـ] عن أبي هريرة [د] عن عثمان [ن] عن ابن مسعود وابن الزبير [هـ] عن عمر وأبي أمامة. مختصر مسلم ٨٧٢، الإرواء ٢١٠٨.