The genes most commonly affected in hereditary breast and ovarian cancer are the BRCA1 and BRCA2 genes. Here, BRCA1 is linked to ovarian cancer.