  We construct the space of infinitesimal variations for the Strominger system
and an obstruction space to integrability, using elliptic operator theory. We
initiate the study of the geometry of the moduli space, describing the
infinitesimal structure of a natural foliation on this space. The associated
leaves are related to generalized geometry and correspond to moduli spaces of
solutions of suitable Killing spinor equations on a Courant algebroid. As an
application, we propose a unifying framework for metrics with holonomy $\SU(3)$
and solutions of the Strominger system.
