Linear correlations of the divisor function