The Messenger of Allah ﷺ was asked about fruit still hanging on the tree. He said, "Whoever in need eats from it with his mouth, without carrying any away in his garment, owes nothing. But whoever carries any of it off owes a fine of twice its value along with punishment. And whoever steals any of it after it has been gathered into the drying enclosure, if the amount reaches the value of a shield, his hand is to be cut off."He also mentioned stray camels and sheep as others have mentioned it.He said that the Prophet was asked about lost property, and he said, "Whatever of it is found on a frequented road or in a populated village, announce it for a year. If the one seeking it comes, hand it over to him, and if he does not come, then it is yours. As for what is found in ruins, in it and in buried treasure there is a fifth."Concerning a stray sheep he said, "Gather it up." Concerning stray sheep he said, "It is for you, or for your brother, or for the wolf. Take it." Just "Take it," and nothing more. Ayub and Yaqub bin Ata said the same about it, from Amr bin Shuayb, from the Prophet ﷺ, who said, "So take it."
حدثنا مسدد حدثنا أبو عوانة عن عبيد الله بن الأخنس عن عمرو بن شعيب بهذا بإسناده قال في ضالة الغنم لك أو لأخيك أو للذئب خذها قط وكذا قال فيه أيوب ويعقوب بن عطاء عن عمرو بن شعيب عن النبي ﷺ قال فخذها
[Hasan] See the two preceding hadiths. Nasai also narrated it in the chapter on cutting off the hand of the thief, the section on stolen hanging fruit, no. 4960, from the hadith of Abu Awana, with this wording.