The set of all solutions to the homogeneous system of matrix equations (X^TA+AX,X^TB+BX)=(0,0), where (A,B) is a pair of symmetric matrices of the same size, is characterized. In addition, the codimension of the orbit of (A,B) under congruence is calculated. This paper is a natural continuation of the article [Linear Algebra Appl. 438:3375-3396, 2013] where the corresponding problems for skew-symmetric matrix pencils are solved. The new results will be useful in the development of the stratification theory for orbits of symmetric matrix pencils.