كتاب الأيمان
27  
The Book of Oaths
(2)
Chapter: Whoever swears by Al-Lat and Al-Uzza, let him say La Ilaha Illallah
(2)
باب مَنْ حَلَفَ بِاللاَّتِ وَالْعُزَّى فَلْيَقُلْ لاَ إِلَهَ إِلاَّ اللَّهُ ‏‏
Sahih Muslim 1648

Abd al-Rahman b. Samura reported Allah's Messenger (ﷺ) as saying:

Do not swear by idols, nor by your fathers.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا عَبْدُ الأَعْلَى، عَنْ هِشَامٍ، عَنِ الْحَسَنِ، عَنْ عَبْدِ، الرَّحْمَنِ بْنِ سَمُرَةَ قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ لاَ تَحْلِفُوا بِالطَّوَاغِي وَلاَ بِآبَائِكُمْ ‏"‏ ‏.‏
Reference : Sahih Muslim 1648
In-book reference : Book 27, Hadith 9
USC-MSA web (English) reference : Book 15, Hadith 4043
  (deprecated numbering scheme)