I think the story is a little bit more complicated because for one product dozens of patents have to be checked (different for the active substance, for dosage, formulation etc etc). This is a very complicated process that is usually carried out by an experienced patent attorney. Information on patents is not included in the submission.
Tomasz is right. For one generic that I was interested in marketing, our patent attorney identified about 100 different patents for synthetic processes, substances, polymorphs, purifications, etc. There were patents owned by the innovator company and also patents owned by other generic companies and universities. It was my responsibility to ensure our product didn't infringe any of these 3rd party patents. It certainly wasn't an easy, quick or cheap task. Many of the patents didn't even mention the drug name. Other answers refer to the US FDA's Orange Book but this won't include all of the relevant patents and probably not even most of them.