Ibn Shihab reported,

With this chain of narration, in the version of Yunus, it states that he heard the Messenger of Allah ﷺ saying...Qutayba bin Saeed narrated to us, Layth narrated to us. Ibn Rumh also narrated to us, al-Layth informed us, from Nafi, from Ibn Umar, from Amir bin Rabia, from the Prophet ﷺ, who said, "When one of you sees a funeral procession, if he is not walking along with it, let him stand until it passes him by, or until it is set down before it passes him."

Muslim 2218

Sahih

و حدثناه قتيبة بن سعيد حدثنا ليث ح و حدثنا محمد بن رمح أخبرنا الليث ح و حدثني حرملة أخبرنا ابن وهب أخبرني يونس جميعا

عن ابن شهاب

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

مسلم 2218صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Funerals
Chapter
Standing for the funeral
Numbering
Darussalam 2218
Muslim 2218