  A formula for the two-loop infrared singularities of dimensionally
regularized QCD scattering amplitudes with an arbitrary number of massive and
massless legs is derived. The singularities are obtained from the solution of a
renormalization-group equation, and factorization constraints on the relevant
anomalous-dimension matrix are analyzed. The simplicity of the structure of the
matrix relevant for massless partons does not carry over to the case with
massive legs, where starting at two-loop order new color and momentum
structures arise, which are not of the color-dipole form. The resulting
two-loop three-parton correlations can be expressed in terms of two functions,
for which some general properties are derived. This explains observations
recently made by Mitov et al. in terms of symmetry arguments.
