Tell me about the fasting of the Messenger of Allah ﷺ.She said, "He used to fast until we would say he is always fasting, and he would break his fast until we would say he is no longer fasting. He did not fast in any month more than he fasted in Shaban. He used to fast all of Shaban except for a little. He used to fast all of Shaban."
أخبرنا محمد بن عبد الله بن يزيد قال حدثنا سفيان عن عبد الله بن أبي لبيد عن أبي سلمة قال سألت
أخبريني عن صيام رسول الله ﷺ قالت كان يصوم حتى نقول قد صام ويفطر حتى نقول قد أفطر ولم يكن يصوم شهرا أكثر من شعبان كان يصوم شعبان إلا قليلا كان يصوم شعبان كله
Muslim recorded it, in the Book of Fasting, in the chapter on the Prophet's ﷺ fasting outside of Ramadan, etc., hadith no. 1156/176, from the hadith of Sufyan bin Uyayna, transmitted in this manner. It is also found in Kubra, hadith no. 2489.