The Messenger of Allah ﷺ forbade the sale of the right of patronage and its gifting.
أخبرنا علي بن حجر قال حدثنا إسمعيل بن إبراهيم عن شعبة عن عبد الله بن دينار
نهى رسول الله ﷺ عن بيع الولاء وعن هبته
Its authenticity was established by Muslim, in the Book of Emancipation, chapter on the prohibition of selling or gifting the right of inheritance from a freed slave (wala), h: 1506, from Ali bin Hajar, and Bukhari, in the Book of Emancipation, chapter on selling or gifting the wala, h: 2535, both from the hadith of Shubah, with this wording. It is also found in Kubra, h: 6255.