صحيح البخاري Sahih Bukhari كتاب الاستقراض The Book of Loans, Freezing of Property, and Bankruptcy
بَابُ الصَّلاَةِ عَلَى مَنْ تَرَكَ دَيْنًا:

(11) Chapter. The funeral Salat (prayer) for a dead person in debt.

2 hadith
Hadith 2398
حَدَّثَنَا أَبُو الْوَلِيدِ ، حَدَّثَنَا شُعْبَةُ ، عَنْ عَدِيِّ بْنِ ثَابِتٍ ، عَنْ أَبِي حَازِمٍ ، عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ ، عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، قَالَ : " مَنْ تَرَكَ مَالًا فَلِوَرَثَتِهِ ، وَمَنْ تَرَكَ كَلًّا فَإِلَيْنَا " .
Narrated Abu Huraira: The Prophet said, "If someone leaves some property, it will be for the inheritors, and if he leaves some weak offspring, it will be for us to support them."
Hadith Reference Sahih Bukhari / The Book of Loans, Freezing of Property, and Bankruptcy / Hadith: 2398
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة
Hadith 2399
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مُحَمَّدٍ ، حَدَّثَنَا أَبُو عَامِرٍ ، حَدَّثَنَا فُلَيْحٌ ، عَنْ هِلَالِ بْنِ عَلِيٍّ ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ أَبِي عَمْرَةَ ، عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ ، أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، قَالَ : " مَا مِنْ مُؤْمِنٍ إِلَّا وَأَنَا أَوْلَى بِهِ فِي الدُّنْيَا وَالْآخِرَةِ ، اقْرَءُوا إِنْ شِئْتُمْ النَّبِيُّ أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ سورة الأحزاب آية 6 ، فَأَيُّمَا مُؤْمِنٍ مَاتَ وَتَرَكَ مَالًا فَلْيَرِثْهُ عَصَبَتُهُ مَنْ كَانُوا ، وَمَنْ تَرَكَ دَيْنًا أَوْ ضَيَاعًا فَلْيَأْتِنِي فَأَنَا مَوْلَاهُ " .
Narrated Abu Huraira: The Prophet said, "I am closer to the believers than their selves in this world and in the Hereafter, and if you like, you can read Allah's Statement: "The Prophet is closer to the believers than their own selves." (33.6) So, if a true believer dies and leaves behind some property, it will be for his inheritors (from the father's side), and if he leaves behind some debt to be paid or needy offspring, then they should come to me as I am the guardian of the deceased."
Hadith Reference Sahih Bukhari / The Book of Loans, Freezing of Property, and Bankruptcy / Hadith: 2399
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة