We report an analysis of the octet baryon masses using the covariant baryon chiral perturbation theory up to next-to-next-to-next-to-leading order with and without the virtual decuplet contributions. Particular attention is paid to the finite-volume corrections and the finite lattice spacing effects on the baryon masses. A reasonable description of all the publicly available nf = 2 + 1 lattice QCD data is achieved. Utilyzing the Feynman-Hellmann theorem, we determine the nucleon sigma terms as σπN = 55(1)(4) Mev and σsN = 27(27)(4) MeV.