If I understand your question correctly, you could go thru the exterior wall, 90 degree elbow up, and extend up above the roof. If your overhang is only 5", that should be easy to do, providing that you observe the venting requirements of your application (too many elbows or long flue runs prevent a proper draft).
However, the appearance of such an arrangement might convince you that straight up thru the roof is the shortest, least expensive and best looking choice. If properly installed and flashed, there should be no concerns about a roof penetration becoming a problem down the road.
As always, offered only as opinion