The chimney passes through an opening in the roof. Flashing is installed on the chimney to ensure that rainwater sheds from the chimney onto the roof rather than into the opening in the roof. This metal flashing includes: a frontpan on the side of the chimney that is lowest on the sloped roof; step-flashing runs up the two sides of the chimney, interspersed between courses of roofing shingles , one side of which sits on the roof and the other side of which sits against the bricks of the chimney. The chimney has counter-flashing on these side faces over this step flashing to direct the rain water onto the roof. Lastly, above the chimney and over the step flashing is the chimney’s backpan, which is installed under any courses of roofing material above the chimney.
As successive layers of roofing are installed, or when roof leaks are repaired, the chimney flashing is often simply water-proofed with tar or caulking. After several re-roofs, there can be so many layers of tar or caulking over rusted-out flashing and deteriorated mortar, that it becomes easier to replace the flashing than to try to locate the source of a leak when the tar/caulking becomes cracked from exposure to sun.