Not only the first goal... the second one too. As C. Ronaldo strike the free kick, D. Berbatov is in an offside position.
But, later when Rooney score his first goal, it was being disallowed due to him being offside. That's a wrong call by the linesman as replay clearly shows that he is well...