The Messenger of Allah ﷺ said, "When a man prays and there is nothing in front of him like the back of a saddle or the middle of a saddle, his prayer is broken by a black dog, a woman, or a donkey."I asked Abu Dharr, "What is the difference between a black dog and a red one or a white one?"He replied, "Nephew, you have asked me just as I asked the Messenger of Allah ﷺ, and he said, 'The black dog is a devil.'"
حدثنا أحمد بن منيع حدثنا هشيم أخبرنا يونس بن عبيد ومنصور بن زاذان عن حميد بن هلال عن عبد الله بن الصامت قال سمعت
قال رسول الله ﷺ إذا صلى الرجل وليس بين يديه كآخرة الرحل أو كواسطة الرحل قطع صلاته الكلب الأسود والمرأة والحمار فقلت لأبي ذر ما بال الأسود من الأحمر من الأبيض فقال يا ابن أخي سألتني كما سألت رسول الله ﷺ فقال الكلب الأسود شيطان
Muslim also narrated it, in the Book of Prayer, Chapter on the amount that shields the one praying, hadith 510, from the hadith of Yunus bin Ubayd, with this same wording.On this subject there are also narrations from Abu Saeed [Abu Dawud, hadith 719], Hakam bin Amr Ghifari [Tabarani in Al-Kabir, 3/211, hadith 3161], Abu Hurairah [Muslim, hadith 511], and Anas [Bazzar, as revealed in Kashf al-Astar, 1/281, hadith 582].