Hadithcore
Sunan Abi Dawud, 2252
sahih· Al-Albani

The tradition mentioned above has also been transmitted by Sahl bin Sa’d through a different chain of narrators. This version has “She was pregnant, he denied pregnancy from him. So her son was attributed to her. In the law of succession the practice (sunnah) was established that the son gets a share in the inheritance of his mother and the mother gets the share in the inheritance of her son according to the shares prescribed by Allaah the Exalted.

حَدَّثَنَا سُلَيْمَانُ بْنُ دَاوُدَ الْعَتَكِيُّ، حَدَّثَنَا فُلَيْحٌ، عَنِ الزُّهْرِيِّ، عَنْ سَهْلِ بْنِ سَعْدٍ، فِي هَذَا الْحَدِيثِ وَكَانَتْ حَامِلاً فَأَنْكَرَ حَمْلَهَا فَكَانَ ابْنُهَا يُدْعَى إِلَيْهَا ثُمَّ جَرَتِ السُّنَّةُ فِي الْمِيرَاثِ أَنْ يَرِثَهَا وَتَرِثَ مِنْهُ مَا فَرَضَ اللَّهُ عَزَّ وَجَلَّ لَهَا ‏.‏

References2 variants
In-Book Reference
Book 13, Hadith 78
English Reference
Book 12, Hadith 2244