كتاب الفرائض
23  
The Book of the Rules of Inheritance
(1)
Chapter: Give The Shares Of Inheritance To Those Who Are Entitled To Them, And Whatever Is Left Goes To The Closest Male Relative
(1)
باب أَلْحِقُوا الْفَرَائِضَ بِأَهْلِهَا فَمَا بَقِيَ فَلأَوْلَى رَجُلٍ ذَكَرٍ ‏‏
Sahih Muslim 1615 a

Ibn Abbas (Allah be pleased with them) reported Allah's Messenger (ﷺ) as saying:

Give the shares to those who are entitled to them, and what remains over goes to the nearest male heir.
حَدَّثَنَا عَبْدُ الأَعْلَى بْنُ حَمَّادٍ، - وَهُوَ النَّرْسِيُّ - حَدَّثَنَا وُهَيْبٌ، عَنِ ابْنِ طَاوُسٍ، عَنْ أَبِيهِ، عَنِ ابْنِ عَبَّاسٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ أَلْحِقُوا الْفَرَائِضَ بِأَهْلِهَا فَمَا بَقِيَ فَهُوَ لأَوْلَى رَجُلٍ ذَكَرٍ ‏"‏ ‏.‏
Reference : Sahih Muslim 1615a
In-book reference : Book 23, Hadith 2
USC-MSA web (English) reference : Book 11, Hadith 3929
  (deprecated numbering scheme)