Sayyiduna Amr bin Shu'aib from his father from his grandfather (may Allah be pleased with him) reports that the Messenger of Allah (peace and blessings be upon him) said: "It is also an act of disbelief for a person to claim or deny a lineage about which he has no certain knowledge, even if this claim is not made explicitly."
Related hadith on this topic