Abu Hurairah reported,

The Prophet ﷺ said, "Satan comes to one of you during his prayer and intrudes between him and himself until he no longer knows whether he has added or omitted. When that happens, let him perform two prostrations before giving the salam, then give the salam."

Ibn Majah 1216

Hasan

حدثنا سفيان بن وكيع حدثنا يونس بن بكير حدثنا ابن إسحق حدثني الزهري عن أبي سلمة

عن أبي هريرة

أن النبي ﷺ قال إن الشيطان يأتي أحدكم في صلاته فيدخل بينه وبين نفسه حتى لا يدري زاد أو نقص فإذا كان ذلك فليسجد سجدتين قبل أن يسلم ثم يسلم

ابن ماجه 1216حسن
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
Prostrations of forgetfulness before the salam
Numbering
Darussalam 1216
Ibn Majah 1216