The Messenger of Allah ﷺ said, "Whoever does not have sandals should wear leather socks, and let him cut them down to below the ankles."
حدثنا بهز بن أسد أبو الأسود حدثنا شعبة حدثنا عبد الله بن دينار سمعت
قال رسول الله ﷺ من لم يجد نعلين فليلبس خفين وليقطعهما من عند الكعبين
Its isnad is sahih. His reliability was already established at 1536, and we add here that Bukhari gave him a biographical entry in al-Kabir 1/2/143. The hadith is an abridgment of 5427.