The Messenger of Allah ﷺ swore an oath to abstain from his wives and declared something forbidden upon himself. He then made what was forbidden lawful again and prescribed an expiation for the oath.
حدثنا الحسن بن قزعة البصري أنبأنا مسلمة بن علقمة أنبأنا داود بن علي عن عامر عن مسروق
آلى رسول الله ﷺ من نسائه وحرم فجعل الحرام حلالا وجعل في اليمين كفارة
[Its isnad is daif]. Ibn Majah also narrated it, chapter on the prohibition of divorce, hadith: 2072, from Hasan bin Qazaa with the same wording, and Ibn Hibban graded it sahih (al-Ihsan): 4264.Maslama bin Alqama narrated munkar hadiths from Dawud, according to the majority, and the mursal version is more sahih.On this subject there is also a report from Abu Musa [Bukhari, hadith: 1191, and Muslim, hadith: 1399], and from Anas in Tabarani as found in Majma al-Zawaid: 10/5, in which is Yusuf bin Khalid Samti, who is accused of fabrication and is discarded as a narrator.