Sahih al-Bukhari, Book 77, Hadith 22 (Bukhari 5578)

Narrated Ibn `Abbas:

The Prophet (ﷺ) said, "Whoever cannot get an Izar, can wear trousers, and whoever cannot wear sandals can wear Khuffs (socks made from thick fabric or leather)."