From Sahih Bukhari (Hadith 1843):
Narrated Ibn `Abbas:The Prophet (ﷺ) delivered a sermon at `Arafat and said, "Whoever does not get an Izar can wear trousers, and whoever cannot get a pair of shoes can wear Khuffs (socks made from thick fabric or leather)
Reference: Bukhari 1843