Sayyiduna Abu Dharr (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) said: "Whoever knowingly attributes himself to someone other than his father has committed kufr (disbelief). Whoever claims what is not his is not one of us, and let him take his seat in Hellfire. And whoever accuses a man of disbelief or of being an enemy of Allah, while he is not like that, the charge will rebound on the one who made the claim, when (the accused) is not like that."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب اللعان / 15335