Complexity of the critical node problem over trees