It is narrated from Sayyiduna Mughirah bin Shu'bah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Do not revile the dead, for by doing so you hurt the living."
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 18137