The flashing should extend at least 6 inches up the chimney and the same length under your roof’s shingles, though the longer, the better.