The Messenger of Allah ﷺ gave the salam, then performed the two prostrations of forgetfulness while seated, then gave the salam again. He mentioned this in the hadith of Dhul-Yadayn.
أخبرنا سويد بن نصر عن عبد الله بن المبارك عن عكرمة بن عمار قال حدثنا ضمضم بن جوس
أن رسول الله ﷺ سلم ثم سجد سجدتي السهو وهو جالس ثم سلم قال ذكره في حديث ذي اليدين
[Its chain is hasan] Abu Dawud narrated it in the Book of Prayer, chapter on forgetfulness in the two prostrations, no. 1016, from the hadith of Ikrima bin Ammar, and it is also in al-Kubra, no. 1253.