The Magisterium teaches two truths on this point:
God wills that all human persons be saved (the universal salvific will of God) - 1 Tim 2:4.
Not all human persons will be saved
The fourth and fifth Lateran Councils, and the Council of Florence taught that the general resurrection includes the human souls in Hell (the reprobate), who will be given eternal punishments. If all are saved, this dogma would be false.
Florence also taught: “But the souls of those who depart this life in actual mortal sin, or in original sin alone, go down straightaway to hell to be punished, but with unequal pains.” And that teaching would be false if no souls were sent to Hell.
Council of Trent: “But although Christ died for all, yet not all receive the benefit of His death, but those only to whom the merit of His passion is communicated.” [Decree on Justification, chap 3] And that teaching implies that not all are saved. For the chief benefit of His death is our eternal salvation.
Other teachings of the Magisterium (less authoritative than the above Councils) –
Council of Quiersy: “because all are not redeemed by the mystery of His passion” [Denzinger 319]
Council of Valence III: “In the condemnation, however, of those who are to be lost, the evil which they have deserved precedes the just judgment of God… in regard to evil men, however, we believe that God foreknew their malice, because it is from them, but that He did not predestine it, because it is not from Him. (We believe) that God, who sees all things, foreknew and predestined that their evil deserved the punishment which followed, because He is just” [Denzinger 322]. The Council of Valence III went on to repeatedly assert that not all human persons are saved. [Denzinger 323ff].
Pope Pius II condemned the proposition: “That all Christians are to be saved.” [Denzinger 717b]
Pope Clement XI condemned a series of errors, including the assertion that “All whom God wishes to save through Christ, are infallibly saved,” and the assertion that grace cannot fail to save all whom God wills, despite obstinate sin [Denzinger 1380, cf. 1360-65].