The passuk says (Devarim 23:3-4):
לֹא־יָבֹ֥א מַמְזֵ֖ר בִּקְהַ֣ל יְהוָ֑ה גַּ֚ם דּ֣וֹר עֲשִׂירִ֔י לֹא־יָ֥בֹא ל֖וֹ בִּקְהַ֥ל יְהוָֽה׃
A Mamzer may not come into the congregation of Hashem; even the tenth generation shall not come for him into the congregation of Hashem.
The Mishnah (Yevamos 78b) takes for granted that a Mamzer’s descendants may never enter into the Congregation:
מתני׳ ממזרין ונתינין אסורין ואיסורן איסור עולם אחד זכרים ואחד נקבות:
Mamzeirim and Nesinim are forbidden, and their prohibition is a prohibition for eternity, whether males or females.
The Gemara, as far as I can tell, does not justify this assertion.
What is the source for this? Perhaps the passuk means that even the tenth generation may not enter, but beyond the tenth generation is permitted? This might be justified by contrasting it to v. 4 regarding Moavites and Amonites:
לֹֽא־יָבֹ֧א עַמּוֹנִ֛י וּמוֹאָבִ֖י בִּקְהַ֣ל יְהוָ֑ה גַּ֚ם דּ֣וֹר עֲשִׂירִ֔י לֹא־יָבֹ֥א לָהֶ֛ם בִּקְהַ֥ל יְהוָ֖ה עַד־עוֹלָֽם׃
An Amonite and Moavite may not come into the congregation of Hashem; even the tenth generation may not come for them into the congregation of Hashem forever.
Unlike the passuk by Mamzeirim, the passuk by Moav and Amon clarifies that it’s forever. Perhaps this indicates by Mamzeirim that it’s only until the tenth generation, but beyond that would be permissible?
What is the Mishnah’s source for asserting that a Mamzer is forbidden even beyond the tenth generation?