Sunan Ibn Majah · Hadith 2084
The Chapters on Marriage - كتاب النكاح
حدثنا هشام بن عمار، حدثنا سفيان بن عيينة، عن الزهري، عن سعيد بن المسيب، عن أبي هريرة، أن النبي صلى الله عليه وسلم قال " الولد للفراش . وللعاهر الحجر " .
It was narrated from Abu Hurairah that: the Prophet said: "The child is for the bed (i.e., belongs to the husband) and the fornicator gets nothing!'
Gradings are classical jarḥ-wa-taʿdīl, name-matched to a rijāl index (not individually re-verified).