Sahih al-Bukhari 4507
صحيح البخاري#4507SahihNarrated Salama:When the Divine Revelation: "For those who can fast, they had a choice to either fast, or feed a poor for every day," (2.184) was revealed, it was permissible for one to give a ransom and give up fasting, till the Verse succeeding it was revealed and abrogated it
Scholarly Authentication
We show the most cautious grade (weakest-wins) as the overall label. Individual scholars graded it as follows:
Every narration in Sahih al-Bukhari is accepted as Sahih (authentic) by the established status of the book.
In-book reference: 65:34