The Clauser-Horne-Shimony-Holt inequality (CHSH) is one of the most popular and well-studied witnesses of Bell's theorem, separating classical from quantum correlations. In this work, for every $d\ensuremath{\ge}2$, we present a generalization of the CHSH inequality with the property that maximal violation is achieved uniquely by the maximally entangled state of local dimension
d. This provides an avenue for device-independent certification of maximally entangled states of arbitrary local dimension.
A hidden variables (HVs) model is reported, which reproduces quantum predictions for Bell-Clauser-Horne-Shimony-Holt (Bell-CHSH) tests. The existence of such a model poses some limitations to quantum certifications that rely on Bell-CHSH inequality violations. The reported model does not prove wrong Bell's theorem. The latter assumes the factorability of the probability density
pAB, which rules the stochastic behavior of the HVs. The reported HVs model is based on an extended form of
pAB, which is suggested by Lebesgue's decomposition theorem for bounded functions. The considered
pAB complies with locality and realism, and also with measurement independence, parameter independence and outcome independence.