Umar came to the Messenger of Allah ﷺ and said, "Messenger of Allah, I have acquired wealth the like of which I have never acquired before. I had a hundred head of livestock, and with them I purchased a hundred shares in Khaybar from its people. I wish to draw near to Allah through it."He replied, "Hold the principal as endowment and dedicate its produce as charity."
أخبرنا محمد بن عبد الله الخلنجي ببيت المقدس قال حدثنا سفيان عن عبيد الله بن عمر عن نافع عن ابن عمر
جاء عمر إلى رسول الله ﷺ فقال يا رسول الله إني أصبت مالا لم أصب مثله قط كان لي مائة رأس فاشتريت بها مائة سهم من خيبر من أهلها وإني قد أردت أن أتقرب بها إلى الله عز وجل قال فاحبس أصلها وسبل الثمرة
No references are available.
[Sahih] See the previous hadith. It is in al-Kubra, hadith no. 6431.