As mentioned there s a rubber boot that serves as a seal to prevent water from leaking in.
How to seal reaeal pipe boot on roof.
These gaps should be sealed.
Find quality vent pipe flashing online or in store.
Now slide the boot down and make sure there is enough caulk to have a seamless circle all the way around.
Even if the hole matches the size of the pipe perfectly there will still be gaps.
Roof water damage repair small hole in roof leaking metal roof how to stop.
Plumbing vent pipes on house roofs are covered with a metal square of flashing and sealed with silicone caulking.
Why do vent pipes leak.
How to seal a plumbing vent pipe on the roof.
Oatey retro master roof 4 in x 8 in aluminum vent and pipe flashing american metal products 4 in x 14 75 in aluminum vent and pipe flashing.
Vent pipes are roof penetrations so holes are created.
On the boots if you have metal roof jacks with rubber boot seals on top with many models the rubber seals can be popped off and replaced without removing the metal part and there are also slip over boots that can just nestle down over the existing damaged boot and overlap the top of the jack but contractor would have to look at it and see then go get parts so if using a contractor.
The flashing of the vent pipes.
The slide the boot down the pipe and leave it about 3 above the roof.