Language:
كتاب الحج
25  
Hajj (Pilgrimage)
(34)
Chapter: Hajj-at-Tamattu', Hajj-al-Qiran, and Hajj-al-Ifrad
(34)
باب التَّمَتُّعِ وَالإِقْرَانِ وَالإِفْرَادِ بِالْحَجِّ وَفَسْخِ الْحَجِّ لِمَنْ لَمْ يَكُنْ مَعَهُ هَدْى
Sahih al-Bukhari 1564

Narrated Ibn `Abbas:

The people (of the Pre-Islamic Period) used to think that to perform `Umra during the months of Hajj was one of the major sins on earth. And also used to consider the month of Safar as a forbidden (i.e. sacred) month and they used to say, "When the wounds of the camel's back heal up (after they return from Hajj) and the signs of those wounds vanish and the month of Safar passes away then (at that time) `Umra is permissible for the one who wishes to perform it." In the morning of the 4th of Dhul- Hijja, the Prophet (ﷺ) and his companions reached Mecca, assuming Ihram for Hajj and he ordered his companions to make their intentions of the Ihram for `Umra only (instead of Hajj) so they considered his order as something great and were puzzled, and said, "O Allah's Messenger (ﷺ)! What kind (of finishing) of Ihram is allowed?" The Prophet (ﷺ) replied, "Finish the Ihram completely like a non-Muhrim (you are allowed everything)."

حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا وُهَيْبٌ، حَدَّثَنَا ابْنُ طَاوُسٍ، عَنْ أَبِيهِ، عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ قَالَ كَانُوا يَرَوْنَ أَنَّ الْعُمْرَةَ فِي أَشْهُرِ الْحَجِّ مِنْ أَفْجَرِ الْفُجُورِ فِي الأَرْضِ، وَيَجْعَلُونَ الْمُحَرَّمَ صَفَرًا وَيَقُولُونَ إِذَا بَرَأَ الدَّبَرْ، وَعَفَا الأَثَرْ، وَانْسَلَخَ صَفَرْ، حَلَّتِ الْعُمْرَةُ لِمَنِ اعْتَمَرْ‏.‏ قَدِمَ النَّبِيُّ صلى الله عليه وسلم وَأَصْحَابُهُ صَبِيحَةَ رَابِعَةٍ مُهِلِّينَ بِالْحَجِّ، فَأَمَرَهُمْ أَنْ يَجْعَلُوهَا عُمْرَةً فَتَعَاظَمَ ذَلِكَ عِنْدَهُمْ فَقَالُوا يَا رَسُولَ اللَّهِ أَىُّ الْحِلِّ قَالَ ‏ "‏ حِلٌّ كُلُّهُ ‏"‏‏.‏
Reference : Sahih al-Bukhari 1564
In-book reference : Book 25, Hadith 50
USC-MSA web (English) reference : Vol. 2, Book 26, Hadith 635
  (deprecated numbering scheme)