Based on the pics. there are a few issues that may or may not be present here. First, the pipe penetration is passing through a manufactured roof boot. They are cheap and easy to replace. They don't last forever, but generally will last as long as a typically shingled roof does, then get replaced during the re-roofing process. The odd issue is that the pipe itself is painted and the the pipe is rusting and the paint failing, with makes it impossible for the boot flange to seal. If It's steel, prior to replacing the boot, I would wire brush the contact area of the pipe clean at spray it with "cold zinc" which is an aerosol spray of grey, zinc rich paint that mimics a galvanized finish. The chimney flashing looks well done, with nicely fabricated and installed sheet metal flashing. It it was sealed with tar, it's one hell of a neat job, and far nicer that 99% of anything I have ever seen done with a caulk tube of "plastic roof cement". Ideally this would be done with a urethane caulk, not any type of "tar" but it's well done, and doesn't indicate any source of concern.
IMHO, most home inspectors are to varying degrees, frauds. A lot of what they do is generate "work product" to justify their billing while being extraordinarily careful to avoid serious issues, or ANY liability for missing said issues. The pics. and comments posted are pretty indicative of their M.O. If it was my house, I would clean and paint the pipe, and swap the boot. If the pipe is an electrical conduit, with a fitting above, or if there is any other issue that would prevent you from cleanly sliding a new boot over the top, any roofing supply will have a split boot that addresses that problem.