It is permissible for a slave man to marry a free woman. The main condition is that the man must not be owned by the woman whom he is marrying, she must not be her mahram, and the woman and her guardians must agree to it since she is marrying below her own status.
Before being freed by Aisha, Barirah was a slave woman who was married to a slave. On being freed she was given the option to separate from her husband, which she adopted. The Prophet ﷺ interceded with her to return to her husband, which indicates that marriage between a free woman and a slave is permissible. See Bukhari 5283, Bukhari 5097.
واتفقوا ... وللحرة أن تنكح العبد إذا رضيت بذلك هي وأولياؤها
They are agreed that ... a free woman can marry a slave if she herself and her guardians are happy with it
— Bidaayat al-Mujtahid
The children from such a marriage are born free, because children born due to marriage follow the status of the mother and not the father.
وأجمع العلماء على أن كل ولد من تزويج فهو تابع لأمه في الرق والحرية
The scholars are unanimous that every child born through marriage follows the status of the mother regarding slavery and freedom
— Bidaayat al-Mujtahid