It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) led the prayer and forgot, and gave the salam after two rak'ahs. A man who was called Dhul-Yadayn said: "O Messenger of Allah! Has the prayer been shortened, or have you forgotten?" He (peace and blessings be upon him) said: "Neither has the prayer been shortened, nor have I forgotten." He said: "You have prayed two rak'ahs." He (peace and blessings be upon him) asked: "Is it as Dhul-Yadayn is saying?" The Companions (may Allah be pleased with them) said: "Yes!" Sayyiduna Ibn Umar (may Allah be pleased with him) said: He (peace and blessings be upon him) went forward and led two rak'ahs, then gave the salam, and then performed the two prostrations of forgetfulness.
Only Abu Usamah Hammad bin Usamah narrated it, and he is among the thiqat (trustworthy narrators).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3911