High temp sealant! Flashing's up-ward leg needs to be under the roofing material. Possible leak above the pipe and is working it's way down (colder weather, wood fire- path of least resistence) excessive flue temp could be ruining the shingles above (very dangerous). What kind of wood stove is it? Is it single, double, or triple wall?