Sunan Abi Dawud, Book 23, Hadith 78 (Abu Dawud 3404)

Narrated Rafi' ibn Khadij:

The Prophet (ﷺ) said: If anyone sows in other people's land without their permission, he has no right to any of the crop, but he may have what it cost him.