Praise be to Allah.
In cases of necessity, there is nothing wrong with the pilgrim in ihram wearing a mask, such as if he has an allergy in his nose and he needs to wear a mask, or if he is passing through thick smoke and needs to wear a mask, or he is passing by a smell and needs to wear a mask. There is nothing wrong with that. End quote.
Majmoo’ Fataawa Ibn ‘Uthaymeen, 22/130, 131