The mass composition is one of the key observables to understand the nature and origin of ultra-high energy cosmic rays.The study of hadronic interactions at energies well beyond human-made accelerators is a fundamental probe of elementary particle physics. In previous analyses, the properties of the hadronic interactions were estimated under the assumption of a certain mass composition, typically proton-dominated, and the cross sections were calculated by fitting the tail of the $X_\mathrm{max}$ distribution. In such an analysis, the impact of a possible He-contamination on the cross section measurement is quoted as a systematic uncertainty. Vice versa, the cosmic-ray mass composition is typically determined using air shower simulations by assuming the validity of the considered hadronic interaction models.
In this contribution, we present a fully self-consistent approach of varying the proton-proton cross sections, with the nucleus-nucleus cross sections being predicted via the Glauber theory, and making a full $X_\mathrm{max}$ distribution fit to get an independent and simultaneous estimation of the interaction cross sections and cosmic-ray primary composition. We will discuss the degeneracy between mass composition and hadronic interactions and compare the sensitivity of the proposed method to one of the previous approaches.