If a person wears khufoof over socks, or socks over khufoof, to which of them does the ruling apply? That is subject to further discussion.
Shaykh Muhammad ibn ‘Uthaymeen (may Allaah have mercy on him) said:
1-If he puts on socks or khufoof then loses his wudoo’, then he puts something else on before he does wudoo’, then the ruling applies to the first one.
i.e., if he wants to wipe over them after that, he must wipe over the first one, and it is not permissible for him to wipe over the upper layer.
2-If he puts on socks or khufoof, then loses his wudoo’ and wipes over them, then he puts something else on over them, then he may wipe over the second layer, according to the correct opinion.
It says in al-Furoo’: It is permissible according to Maalik. End quote. Al-Nawawi said: This appears to be more correct because he put them on when he was in a state of purity, and the suggestion that it is purity that is lacking is not acceptable. End quote. If we accept that, then it is the beginning of the period during which he may wipe (over the khufoof or socks), and in this case he may wipe over the first (layer) without a doubt.
3-If he puts khufoof over khufoof or socks, and wipes over the top layer then takes it off, can he wipe over the lower layer for the remainder of the period? I have not seen anyone who explicitly stated this, but al-Nawawi narrated from Abu’l-‘Abbaas ibn Surayj, concerning a case where an overshoe is worn over the khuff: they are like a single khuff, of which the upper layer is visible and the lower layer is hidden. I say: based on that, it is permissible to wipe over the lower layer until the period for wiping over the upper layer ends, such as if the upper layer of the khuff is scratched off, he may wipe over the lower layer.
End quote from Fataawa al-Tahaarah by Shaykh Ibn ‘Uthaymeen (p. 192).
The overshoe or galosh is a khuff that is worn over the ordinary khuff, especially in cold countries.
What is meant by the upper and lower (or outer and inner) layers is if there is a khuff of two layers, then the upper layer is called the outer and the lower layer is called the inner. Al-Sharh al-Mumti’ (1/211).
Thus it is clear that if a person wears khufoof over socks, then he takes off the upper or outer layer of the two, if he wipes over it, then his taking it off does not invalidate his wiping, and he may wipe over the lower or inner layer in all the cases mentioned by the shaykh, until the end of the period for wiping over the khufoof or socks.
And Allaah knows best.