Ibn ‘Umar reported that ‘Umar smelled the pleasant smell of perfume coming from Mu’awiyah while the latter was in the state of ihram. ‘Umar commanded him: “Get back, and wash it off. I have heard the Prophet (peace be upon him) saying: ‘A pilgrim must be unkempt and without any perfume.” This is reported by Al-Bazzar with a sound chain.
The Prophet (peace be upon him) said: “Wash away the perfume that you are wearing.” He repeated this thrice. The body of a deceased muhrim should neither be perfumed during the washing, nor any perfume be applied to his shroud. (Abu Hanifah, however, holds it is permissible) Concerning a muhrim dying in the state of ihram, the Prophet (peace be upon him) said: “Do not cover his head, nor perfume his body, because on the Day of Resurrection he will be raised with talbiyah on his lips.” There is no harm, however, if some of the perfume used by a muhrim on his body or clothes before entering the state of ihram is left over.
It is permissible, however, to smell the things that are not planted for their scent such as apples and quince. These plants are similar to other plants that are not planted for their scent, nor is it extracted from them.
As for the perfume that one may acquire from touching the Ka’bah, there is no harm. Sa’id bin Mansur reported that Salih bin Kaisan said: “I have seen Anas bin Malik in the state of ihram, while some perfume from the Ka’bah was rubbed on his Hajj garb, but he did not wash it off.” ‘Ata said: “Such a person does not have to wash it off, nor does he need to make any atonement.” The Shafi’i school holds that if someone purposely did so (applied perfume), or was accidentally perfumed, and he could wash it off, but he did not do so, he would be committing a wrong for which he will have to pay a penalty.”