Sunan Ibn Majah, Book 9, Hadith 2083 (In-Book) ⓘ
It was narrated from 'Umar that: the Messenger of Allah ruled that the child belonged to the bed.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا سُفْيَانُ بْنُ عُيَيْنَةَ، عَنْ عُبَيْدِ اللَّهِ بْنِ أَبِي يَزِيدَ، عَنْ أَبِيهِ، عَنْ عُمَرَ، أَنَّ رَسُولَ اللَّهِ ـ صلى الله عليه وسلم ـ قَضَى بِالْوَلَدِ لِلْفِرَاشِ .
also referenced under: Hadith 2005 (Reference) & Volume 3, Book 9, Hadith 2005 (DarusSalam)