Abd al-Rahman bin Abi al-Zinad (may Allah have mercy on him) narrates from his father, and he from the authoritative jurists of Madinah, that a child born of zina has a bad origin; when his condition and his integrity (muru'ah) are good, he is fit to give testimony, and freeing him is also good.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 21181