The Messenger of Allah ﷺ said in the year of the Conquest, while he was in Makkah, "Allah and His Messenger have forbidden the sale of wine, carrion, swine, and idols."He was then asked, "Messenger of Allah, what about the fat of carrion? It is used to coat ships, to grease hides, and people use it for lamp fuel."He replied, "No, it is forbidden."Then the Messenger of Allah ﷺ said, "May Allah destroy the Jews. Allah forbade them the fat, but they melted it down, sold it, and consumed its price."
حدثنا عيسى بن حماد المصري أنبأنا الليث بن سعد عن يزيد بن أبي حبيب أنه قال قال عطاء بن أبي رباح سمعت
قال رسول الله ﷺ عام الفتح وهو بمكة إن الله ورسوله حرم بيع الخمر والميتة والخنزير والأصنام فقيل له عند ذلك يا رسول الله أرأيت شحوم الميتة فإنه يدهن بها السفن ويدهن بها الجلود ويستصبح بها الناس قال لا هن حرام ثم قال رسول الله ﷺ قاتل الله اليهود إن الله حرم عليهم الشحوم فأجملوه ثم باعوه فأكلوا ثمنه
Bukhari narrated it in Al-Maghazi, chapter (52), no. 4296, and Muslim in Al-Musaqah, chapter on the prohibition of selling wine, carrion, pigs, and idols, no. 1581, from the hadith of Layth, with this wording.