The Schikorr reaction
Iron in mafic rocks is predominantly in the form of iron(II) and thus its hydroxide would be ferrous hydroxide, $\text{Fe(OH)}_2$. Unlike dissolved ferrous ions, this hydroxide can displace hydrogen from water via the Schikorr reaction, forming magnetite ($\text{Fe}_3\text{O}_4$) with evolution of hydrogen:
$\text{3 Fe(OH)}_2 \to \text{Fe}_3\text{O}_4 + \text{H}_2 + 2\text{H}_2\text{O}$
This reaction is well known not only in serpentization but also as a component reaction in the rusting of iron.