The Prophet ﷺ said, "Satan comes to one of you during his prayer so that he does not know whether he has added or omitted something. When one of you experiences this, let him perform two prostrations."
حدثنا إبراهيم حدثنا رباح عن معمر عن الزهري عن أبي سلمة
عن النبي ﷺ قال إن الشيطان يأتي أحدكم في صلاته فلا يدري أن زاد أم نقص فإذا وجد أحدكم ذلك فليسجد سجدتين
Its isnad is sahih. It appears in Jami al-Masanid 7:462, drawn from this same passage, and it is a repetition of 7284 and 7680 with similar wording. As for his statement here, "so he does not know whether he added or omitted" (فلا يدري أن زاد أم نقص), this is what is established in manuscripts H and M. In M, above the word "an" there is a mark confirming that this reading is correct. What is established in manuscript K, and in Jami al-Masanid, is "azada" with the interrogative hamza, without the word "an."