Hilchos Lashon Hara chapter 8, section 9

Know also that it is forbidden to disparage and insult the dead. The poskim write that the early sages made an enactment and a ban not to speak evil of the dead. This applies even if the deceased is unlearned. If he is a Torah scholar disparaging him is an enormous sin that deserves excommunication as the Yoreh Deáh rules (243:7). The prohibition against disparaging a Torah scholar applies even to disparaging him, and how much more so to disparaging his Torah.