Umar said to the Prophet ﷺ, "The hundred shares I own at Khaybar are the most precious property I have ever acquired, and I wish to give them in charity."The Prophet ﷺ replied, "Hold the principal as an endowment and dedicate its produce to charity."
أخبرنا سعيد بن عبد الرحمن قال حدثنا سفيان بن عيينة عن عبيد الله بن عمر عن نافع عن ابن عمر قال
للنبي ﷺ إن المائة سهم التي لي بخيبر لم أصب مالا قط أعجب إلي منها قد أردت أن أتصدق بها فقال النبي ﷺ احبس أصلها وسبل ثمرتها
Sourcing, [sahih] Ibn Majah narrated it in Sadaqat, chapter of "One who endows a waqf," no. 2397, from the hadith of Ibn Uyayna with this wording. It also appears in Kubra, no. 6430. It is also said that Abdullah Umari narrated it, and its chain is strong, as noted in Tashil al-Hajah, no. 1299, 366.