Sunan Ibn Majah, Book 23, Hadith 26 (Ibn Majah 2746)

It was narrated from ‘Amr bin Shu’aib, from his father, from his grandfather, that the Prophet (ﷺ) said:

“It is disbelief for a man to attribute himself to someone other than his father knowingly, or to deny his connection to his father, even subtly.”*