How should location on roof be flashed or sealed

atticflashingroof

During hurricane Florence we had significant water get into our house from the roof. There is a location in our roof (see pic) where from inside in the attic I am able to stick a toothbrush through and see nearly all of it from outside the house. What would be the appropriate way to flash this or seal it to prevent water from coming into the attic from this location?

enter image description here

Best Answer

roof flashing enter image description here roof flashing2

There are a few other ways to do the detail, just variations on the same theme.