Language:
كتاب المحصر
27  
Pilgrims Prevented from Completing the Pilgrimage
(6)
Chapter: The saying of Allah Ta'ala "... Or giving Sadaqa ..."
(6)
بَابُ قَوْلِ اللَّهِ تَعَالَى: {أَوْ صَدَقَةٍ} وَهْيَ إِطْعَامُ سِتَّةِ مَسَاكِينَ
Sahih al-Bukhari 1815

Narrated Ka`b bin `Umra:

Allah's Messenger (ﷺ) stood beside me at Al-Hudaibiya and the lice were falling from my head in great number. He asked me, "Have your lice troubled you?" I replied in the affirmative. He ordered me to get my head shaved. Ka`b added, "This Holy Verse:--'And if any of you is ill, or has ailment in his scalp (2.196), etc. was revealed regarding me. "The Prophet (ﷺ) then ordered me either to fast three days, or to feed six poor persons with one Faraq (three Sas) (of dates), or to slaughter a sheep, etc. (sacrifice) whatever was available.

حَدَّثَنَا أَبُو نُعَيْمٍ، حَدَّثَنَا سَيْفٌ، قَالَ حَدَّثَنِي مُجَاهِدٌ، قَالَ سَمِعْتُ عَبْدَ الرَّحْمَنِ بْنَ أَبِي لَيْلَى، أَنَّ كَعْبَ بْنَ عُجْرَةَ، حَدَّثَهُ قَالَ وَقَفَ عَلَىَّ رَسُولُ اللَّهِ صلى الله عليه وسلم بِالْحُدَيْبِيَةِ، وَرَأْسِي يَتَهَافَتُ قَمْلاً فَقَالَ ‏"‏ يُؤْذِيكَ هَوَامُّكَ ‏"‏‏.‏ قُلْتُ نَعَمْ‏.‏ قَالَ ‏"‏ فَاحْلِقْ رَأْسَكَ ـ أَوْ قَالَ ـ احْلِقْ ‏"‏‏.‏ قَالَ فِيَّ نَزَلَتْ هَذِهِ الآيَةُ ‏{‏فَمَنْ كَانَ مِنْكُمْ مَرِيضًا أَوْ بِهِ أَذًى مِنْ رَأْسِهِ‏}‏ إِلَى آخِرِهَا‏.‏ فَقَالَ النَّبِيُّ صلى الله عليه وسلم ‏"‏ صُمْ ثَلاَثَةَ أَيَّامٍ، أَوْ تَصَدَّقْ بِفَرَقٍ بَيْنَ سِتَّةٍ، أَوِ انْسُكْ بِمَا تَيَسَّرَ ‏"‏‏.‏
Reference : Sahih al-Bukhari 1815
In-book reference : Book 27, Hadith 10
USC-MSA web (English) reference : Vol. 3, Book 28, Hadith 42
  (deprecated numbering scheme)