The Book of Musaqah
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَنِ اقْتَنَى كَلْبًا إِلاَّ كَلْبَ مَاشِيَةٍ أَوْ ضَارِي نَقَصَ مِنْ عَمَلِهِ كُلَّ يَوْمٍ قِيرَاطَانِ " .Ibn Umar (Allah be pleased with him) reported Allah's Messenger (ﷺ) as saying:He who keeps a dog other than that meant for watching the herd or for hunting loses every day out of his deeds equal to two qirat
From Sahih Muslim, whose reports the scholars accept as authentic.