The Messenger of Allah ﷺ prohibited muhaqalah, muzabanah, muawamah, and mukhabarah. One of the two narrators explained that selling crops years in advance is muawamah. He also prohibited thunya, but granted a concession for araya.
نهي رسول الله ﷺ عن المحاقلة والمزابنة والمعاومة والمخابرة-قال أحدهما: بيع السنين هي المعاومة- وعن الثنيا، ورخص في العرايا.
Narrated by Muslim in the Book of Sales (1536:85), through the route of Hammad bin Zayd, who said, Ayub narrated to us, from Abu Zubayr and Saeed bin Mina, from Jabir bin Abdullah, who said what he mentioned. He also narrated it through the route of Ataa, from Jabir (86), with the wording, "The Messenger of Allah ﷺ forbade leasing land, and forbade selling it for years in advance, and forbade selling dates before they ripen."On this subject there is also what has been reported from Ibn Abbas, that the Prophet ﷺ forbade selling the fruit of palm trees for two or three years in advance, or buying it while still on the treetops by measure, or selling the fruit before its soundness becomes apparent. This was narrated by Bazzar, in Kashf Astar (1281), from Muhammad bin Muawiya bin Salih, who said, Abbad bin Awwam narrated to us, who said, Hajjaj bin Artah narrated to us, from Ataa, from Ibn Abbas, who mentioned it. Bazzar said, "We do not know of it being narrated with a better isnad than this."I say, it contains Hajjaj bin Artah, who practiced tadlis and used to make many mistakes.On this subject there is also what has been reported from Samura, that the Prophet ﷺ forbade selling by years. This was narrated by Tabarani in Al-Kabir (7:253), from Abu Zanbaa Rawh bin Faraj and Muhammad bin Amr bin Khalid Harrani, both of whom said, Saeed bin Afir narrated to us, who said, Kahmas bin Minhal narrated to us, who said, Saeed bin Abu Aruba narrated to us, from Qatada, from Hasan, from Samura, who mentioned it. Saeed bin Abu Aruba became confused in his later years, and Kahmas bin Minhal is among those who heard from him after that confusion set in."Selling by years" means selling the fruit of a palm tree for a period of two or three years in advance, and this is invalid by unanimous agreement, because it is the sale of something that does not exist at the time of the contract, and it involves uncertainty, ignorance of the outcome, and an inability to guarantee delivery in the event of a crop failure.