Hasan Basri (may Allah have mercy on him) says that it reached him that the Noble Prophet (peace and blessings be upon him) decreed that the child belongs to the owner of the bed, and for the adulterer there are stones.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 10386