The Messenger of Allah ﷺ forbade the sale by pebble-throwing and any sale involving uncertainty.
حدثنا يحيى بن سعيد عن عبيد الله عن أبي الزناد عن الأعرج
أن رسول الله ﷺ نهى عن بيع الحصى وبيع الغرر
Its chain of transmission is sahih. Ubaydullah is Ibn Umar bin Hafs bin Asim, one of the seven jurists. Tirmidhi stated explicitly in his narration that he is Ibn Umar. He is the one from whom the two Sheikhs (Bukhari and Muslim) narrate.In some copies of Abu Dawud, this chain contains "bin Abu Ziyada," as is established in Awn al-Mabud, marked as a variant copy reading. Professor Muhammad Muhyi al-Din Abdul-Hameed included this addition, set between the two marks indicating a variant, in his edition of Abu Dawud. This is a plain error, indeed it reflects ignorance of the narrators and chains on the part of the copyist of the manuscript from which the author of Awn al-Mabud took this addition. Ubaydullah bin Abu Ziyad Qaddahi Makki has no connection to this hadith. Muslim did not narrate anything from him at all, and he is not mentioned as narrating from Abu Zinad. Rather, it is stated explicitly in Tahdhib that he has only one hadith recorded by Ibn Majah, and it is a different hadith from this one, even though Ibn Majah did narrate this particular hadith, as will become clear from the sourcing, Allah willing.Muslim narrated this hadith (1:443) through Abdullah bin Idris, Yahya bin Saeed [Ahmad's teacher here], and Abu Usama. Abu Dawud narrated it (3376, page 262 of Awn al-Mabud) through Ibn Idris [who is Abdullah]. Tirmidhi narrated it (235) through Ibn Idris [who is Abdullah], and through Yahya, who is Ibn Saeed, Ahmad's teacher. Ibn Majah narrated it (2194) through Abdul-Aziz bin Muhammad, who is Darawardi. All of them narrated from Ubaydullah, and Tirmidhi stated explicitly that he is Ubaydullah bin Umar in this chain. Tirmidhi said, The hadith of Abu Hurairah is a hasan sahih hadith.Ibn Jarud narrated it in Al-Muntaqa (page 283) through Uqba bin Khalid, who said, Ubaydullah, meaning Ibn Umar, narrated to us, and then he related it.What settles decisively the correctness of what we have said is that among all those who narrated it from Ubaydullah bin Umar, none is mentioned as narrating from Ubaydullah bin Abu Ziyad except Yahya bin Saeed Qattan alone. And Abu Dawud did not narrate it through Yahya Qattan, so there is no basis for imagining that this addition found in some of his copies has any foundation or validity.This hadith will come again several times (8871, 9626 duplicate, 10443 duplicate). See also what has already passed in the Musnad of Ibn Abbas (2752), in the Musnad of Ibn Masud (3676), and in the Musnad of Ibn Umar (6307)."Al-hasa" (pebbles), with fatha on the ha and the sad, both unmarked letters, ending in an alif maqsura, is the plural of "hasah" (a pebble). In most of the narrations we have referred to, it appears as "al-hasah" in the singular. Ibn Athir said, This refers to the seller or buyer saying, "When I toss the pebble to you, the sale becomes binding." It has also been said that it means saying, "I sell you whichever of these goods your pebble lands on when you throw it," or, "I sell you land extending to wherever your pebble reaches." All of these are invalid, because they belong to the sales practices of the pre-Islamic era, and all of them involve gharar, due to the uncertainty they contain.In (ح), it appears as "al-khasi" with a dotted kha, which is a printing error.Gharar, with fatha on the dotted ghayn and the ra, refers to something that has an outward appearance which deceives the buyer, while its inner reality is unknown. A detailed explanation of its meaning has already been given previously (2752).