The minimal supersymmetric standard model opens the possibility of electroweak baryogenesis provided that the light scalar top quark (stop) is lighter than the top quark. In addition, the lightest neutralino is an ideal candidate to explain the existence of dark matter. For a light stop with mass close to the lightest neutralino, the stop-neutralino coannihilation mechanism becomes efficient, thus rendering the predicted dark matter density compatible with observations. Such a stop may however remain elusive at hadron colliders. Here it is shown that a future linear collider provides a unique opportunity to detect and study the light stop. The production of stops with small stop-neutralino mass differences is studied in a detailed experimental analysis with a realistic detector simulation including a CCD vertex detector for flavor tagging. Furthermore, the linear collider, by precision measurements of superpartner masses and mixing angles, also allows to determine the dark matter relic density with an accuracy comparable to recent astrophysical observations.