Abu Dharr reported,

I came to the Prophet ﷺ while he was wearing a white garment and was asleep. Then I came to him again after he had woken up, and he said, "There is no servant who says 'There is no god but Allah' and then dies upon that except that he will enter Paradise."I asked, "Even if he commits adultery and even if he steals?"He replied, "Even if he commits adultery and even if he steals."I asked again, "Even if he commits adultery and even if he steals?"He replied, "Even if he commits adultery and even if he steals."I asked a third time, "Even if he commits adultery and even if he steals?"He replied, "Even if he commits adultery and even if he steals, in spite of Abu Dharr."Whenever Abu Dharr would narrate this hadith, he would add, "Even if it displeases Abu Dharr."Abu Abdullah said, "This applies at the moment of death or before it, when he repents, feels remorse, and says 'There is no god but Allah,' then he is forgiven."

Bukhari 5827

Sahih

حدثنا أبو معمر حدثنا عبد الوارث عن الحسين عن عبد الله بن بريدة عن يحيى بن يعمر حدثه أن أبا الأسود الدؤلي حدثه أن

أبا ذر رضي الله عنه حدثه قال

أتيت النبي ﷺ وعليه ثوب أبيض وهو نائم ثم أتيته وقد استيقظ فقال ما من عبد قال لا إله إلا الله ثم مات على ذلك إلا دخل الجنة قلت وإن زنى وإن سرق قال وإن زنى وإن سرق قلت وإن زنى وإن سرق قال وإن زنى وإن سرق قلت وإن زنى وإن سرق قال وإن زنى وإن سرق على رغم أنف أبي ذر وكان أبو ذر إذا حدث بهذا قال وإن رغم أنف أبي ذر قال أبو عبد الله هذا عند الموت أو قبله إذا تاب وندم وقال لا إله إلا الله غفر له

البخاري 5827صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Clothing
Chapter
White garments
Numbering
Darussalam 5827
Bukhari 5827