‘A’isha said that a client of God’s Messenger died leaving some property, but no relative or child, and God’s Messenger said, “Give what he has left to a man belonging to his village."
‘Amr b. Shu'aib, on his father's authority, said his grandfather reported the Prophet as saying, “If a man commits fornication with a freewoman or a slave woman the child is the product of fornication, and neither does he inherit nor may anyone inherit from him."
Buraida said that a man of Khuza'a died and his estate was brought to the Prophet who gave instructions to look for an heir of his or some relative, but they found neither, so God’s Messenger said, “Give it to the leading man* of Khuza'a’ (al-kubr. This may mean the greatest in rank or in age, or, more probably, the nearest in kin to the man's oldest ancestor, the one with fewest intermediate links.
Abu Dawud transmitted it. In a version by him he said, “Look for the greatest (akbar. This might mean greatest or oldest, but it is most probably used here in the same sense as al-kubr) man of Khuza'a.'’
Narrated Wathila b. al-Asqa‘ reported God’s Messenger as saying, “A woman gets inheritance from the three following:
one she has set free, a foundling, and her child about whom she has invoked a curse on herself if she was untrue in declaring he was not born out of wedlock.”