The Messenger of Allah ﷺ said, "The child belongs to the marriage bed, and the adulterer gets the stone."
قال رسول الله ﷺ: الولد للفراش، وللعاهر الحجر.
Nasai (3486) and Ibn Hibban (4104) both narrated it from the hadith of Jareer, from Mughira, from Abu Waail, from Abdullah, and he mentioned it. Its chain of transmission is sahih, except that Nasai said, "I do not think this is from Abdullah bin Masud."I say, the apparent state of its chain is that it is sahih, and I do not know the reason for Nasai's statement.