Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) said: We mentioned onions and leeks (kurrath) in the presence of the Messenger of Allah (peace and blessings be upon him), and a man said: "There is something even worse than that." The Messenger of Allah (peace and blessings be upon him) said: "What is it?" He said: "Garlic. O Messenger of Allah, do you declare it unlawful?" He (peace and blessings be upon him) said: "No, (it is not unlawful), but whoever eats it should not come near the mosque until its smell has gone."
Hadith Referenceالمعجم الأوسط / باب الميم / 8663
Hadith Takhrij«أخرجه مسلم فى «صحيحه» برقم: 565، وابن خزيمة فى «صحيحه» برقم: 1667، 1669، وابن حبان فى «صحيحه» برقم: 2085، وأبو داود فى «سننه» برقم: 3823، والبيهقي فى «السنن الكبرى» برقم: 5139، 5140، وأحمد فى «مسنده» برقم: 11243، 11761، 11802، 11984، 12117، والطيالسي فى «مسنده» برقم: 2285، وأبو يعلى فى «مسنده» برقم: 1183، 1195، وعبد الرزاق فى «مصنفه» برقم: 1739، وابن أبي شيبة فى «مصنفه» برقم: 24821، والطبراني فى «الأوسط» برقم: 3230، 7658»