Awf bin Malik reported,

The Messenger of Allah ﷺ said, "Dreams are of three kinds. Some are terrors from Satan meant to grieve the son of Adam, some reflect what a man preoccupies himself with while awake and then sees in his sleep, and some are one part of forty-six parts of prophethood."I asked him, "Did you yourself hear this from the Messenger of Allah ﷺ?"He replied, "Yes, I heard it from the Messenger of Allah ﷺ. I heard it from the Messenger of Allah ﷺ."

Ibn Majah 3907

Sahih

حدثنا هشام بن عمار حدثنا يحيى بن حمزة حدثنا يزيد بن عبيدة حدثني أبو عبيد الله مسلم بن مشكم

عن عوف بن مالك

عن رسول الله ﷺ قال إن الرؤيا ثلاث منها أهاويل من الشيطان ليحزن بها ابن آدم ومنها ما يهم به الرجل في يقظته فيراه في منامه ومنها جزء من ستة وأربعين جزءا من النبوة قال قلت له أنت سمعت هذا من رسول الله ﷺ قال نعم أنا سمعته من رسول الله ﷺ أنا سمعته من رسول الله ﷺ

ابن ماجه 3907صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Dream interpretation
Chapter
Dreams are of three kinds
Numbering
Darussalam 3907
Ibn Majah 3907