Lol, it’s not illegal. Words have consequences, though. If you use the stage afforded to you by your work, or your work is contingent on having a voice they want associated with them, then you may lose your job over your comments, no matter who you criticize.