Finding all rows of 2 variables using Gaussian Elimination
If I understand you correctly, you have a matrix $M$ over $GF(2)$ (the field with two elements), and want to find all linear combinations of rows which have weight exactly $2$.

Using Gaussian elimination, you can bring your matrix into echelon form. This makes it easy to determine, for any particular row, whether it is in the span of the rows of $M$. Since there are only $\binom{n}{2}$ many rows of weight $2$, the entire algorithm will run in polynomial time. (It is likely that this can be optimized further.)