Yevamos 9:2-3
Yevamos 9:2
The following women are prohibited to their husbands but permitted to their brothers-in-law: a Kohein Gadol who betrothes a widow and who has a brother who is a regular kohein; a fit kohein who married a chalalah (woman invalidated from marrying a kohein) and who has a brother who is a chalal (the "unfit" offspring of a kohein); a Yisroel who married a mamzeres (the product of an adulterous or incestuous relationship) and who has a brother who is a mamzer; a mamzer who marries the daughter of a Yisroel and who has a brother who is a Yisroel. In all of these cases, the wives are prohibited to their husbands and permitted to their brothers-in-law. Prohibited to both husband and brother-in-law includes: a Kohein Gadol who married a widow and who has a brother who is a Kohein Gadol or a regular kohein; a fit kohein who married a chalalah and who has a brother who is also a fit kohein; a Yisroel who married a mamzeres and who has a brother who is also a Yisroel; a mamzer who marries the daughter of a Yisroel and who has a brother who is also a mamzer. All other women are permitted to both their husbands and their brothers-in-law.
Yevamos 9:3
Regarding the secondary prohibited relationships instituted by rabbinic enactment, if she is a secondary relation to her husband but not to her brother-in-law, she is prohibited to the husband and permitted to the brother-in-law. If she is a secondary relation to her brother-in-law but not to her husband, she is prohibited to the brother-in-law and permitted to the husband. If she is a secondary relation to both, she is prohibited to both. If a couple prohibited by such a relationship married anyway, she is not entitled to the value of her kesubah, the profits of the property she brought into the marriage, maintenance or the depreciation of her property. (All of this is to provide a disincentive to entering into such prohibited marriages.) The child of such a union is legitimate and the husband is compelled to divorce his prohibited wife. If a widow married a Kohein Gadol, or if a divorcee or a woman who performed chalitzah married a regular kohein, or if a mamzeres or a Gibeonite married a Yisroel, or if the daughter of a Yisroel married a mamzer or a Gibeonite – in all of these cases, the wife is entitled to the value of her kesubah, as well as all the other benefits mentioned above. (The rabbinically-prohibited relationships require the additional disincentive but these Biblically-prohibited relationships are their own disincentives.)