The Ruling on One Who Was Absent From His Wife For Four Years, Then She Bore Him a Son
A man was absent for his wife for four years, then she bore him a son after the aforementioned period, is the child attributed to him, bearing in mind that his wife is free, not a slave?
If he had intercourse with her, then the child is attributed to the husband, according to the most authoritative of opinions held by the scholars, based upon the saying of the Prophet (sallallaahu alaihi wa sallam): The child belongs to the bed (on which he was born ý i.e., to the man who owns it)  And the husband may reject it, if he knows that it is not from him, by which he makes an allegation of adultery against his wife.
 Al-Bukhari no. 6818 and Muslim no. 1458.
Shaykh `Abdul-`Azeez Bin Baz
Fatawa Islamiyah Vol. 5 Page 191