The Messenger of Allah ﷺ said, "Whoever cannot find sandals should wear leather socks, and whoever cannot find a waist-wrap should wear trousers."
حدثنا يحيى بن آدم وأبو النضر حدثنا زهير عن أبي الزبير
قال رسول الله ﷺ من لم يجد نعلين فليلبس خفين ومن لم يجد إزارا فليلبس سراويل
Its chain of transmission is sahih, and these commands concern Hajj. The hadith was recorded by Muslim (2/836, no. 1179) in the chapters on Hajj, on what is permitted for one in ihram, and by Ibn Abu Shayba (4/101) in the chapters on Hajj, on the one in ihram who cannot find a waist-wrap, and it appears with similar wording in all the Sahih collections.