Volume 2 · Book 23 · Hadith 397
Narrated Abu Said Al-Khudri The Prophet said, "When you see a funeral procession, you should stand up, and whoever accompanies it should not sit till the coffin is put down."
— Sahih Bukhari, Volume 2, Book 23: Funerals (Al-Janaa'iz), Hadith #397