The Holy Prophet (SAW) was seen wiping (Masa) over his Khuffs. The Khuffs mean leather socks. Narrated ‘Abdullah bin ‘Umar: Sa’d bin Abi Waqqas said, “The Prophet passed wet hands over his Khuffs.” ‘Abdullah bin ‘Umar asked Umar (RA) about it. ‘Umar replied in the affirmative and added, “Whenever Sa’d narrates a Hadith from the Prophet (SAW), there is no need to ask anyone else about it.” (Al Bukhari Volume 1, Book 4, Number 201)
Narrated Al-Mughlra bin Shu’ba: Once Allah’s Apostle went out to answer the call of nature and I followed him with a tumbler containing water, and when he finished, I poured water and he performed ablution and passed wet hands over his Khuffs. (Al Bukhari Volume 1, Book 4, Number 202)
Imam Abu Hanifa (RA) has said that the most revered Prophet (SAW) not only performed Masa on his Khuffs but also urged his companions (May Allah be pleased with them all). He said: “I fear that whoever denies wiping over socks has almost left Islam because the narrations regarding it have almost reached the level of tawatur.”
Tawatur means the multiplicity of the sources of a certain report that leads to certitude in the listener that the report is indeed true. Ibn Hajar verifies this by saying, “The experts of Hadith have confirmed that the narrations which establish the permissibility of wiping over socks have reached the status of tawatur.”
Before discussing whether wiping is permissible on all types of socks or not, it has to be made clear that it (Masa) can be done only in a state of purity. A person must have performed full ablution (including washing of the feet) in the morning. It cannot be performed when a person is in a state of impurity or when the socks are filthy.
A resident can avail this concession for twenty-four hours and this period starts when he first performed it. A traveler can, however, avail it for three days. But if a person takes off his socks, he has to wash his feet as well while performing ablution.
The Holy Prophet (SAW) wiped over the top of the sock rather than the bottom.
Ulema are divided on the permissibility of wiping over all types of socks. That the permission to wipe on socks or stockings is not limited to leather is the view authenticated by great scholars and mujtahids such as Ibn Taymiyyah and others; the reasoning is quite clear. The Prophet (SAW) never stated that the permission was limited to leather socks. Therefore, the same rule can be extended to all types of socks or stockings regardless of whether they are made of leather, cotton, wool, or synthetic, so long as it is halal (permitted) material.
It is permissible if a person has some infection/ailment in the feet and has applied medicine which can be washed away by use of water.
Wiping has been allowed in office bathrooms which remain dirty and where washing can render ones feet filthy. The socks, however, must cover ankles.