I think that smudge is element separation. The Pentax-M 40mm f2.8 is prone to separation in a pair of elements in the rear lens group. The very thin layer of glue between the lenses breaks down. It looks like something that'll clean right off, or one or more of the other issues suggested.
You could attempt to clean the rear element. You can probably remove the rear group with a lens spanner in the outermost slots, without removing the mount. An improvised lens spanner can be made from an old compass, dividers or needlenose pliers with tips ground to fit the slots.
Oil can evaporate from the grease used to lubricate the focus threads, and end up deposited on the aperture blades and interior lens surfaces on either side of that. Sometimes it is visible on the blades, sometimes not. The grease used by Pentax doesn't usually do that. If you can get the rear element cleaner or notice that the blades close slowly from wide open to f22, it's oil. You can see guides to disassembling other Pentax M series lenses in the Maintenance section. The 40mm is similar to most of those.
If I'm right, my suggestion is to just ignore it. The glue can be dissolved and the elements reglued, but this is generally not worth the trouble for that lens. I have an SMC Pentax-F 70-210 zoom with element separation in the front group, and it doesn't affect shots very much if at all. Here's my attempt to show it in a photo. The cloudiness around the edges sometimes has a gasoline on a puddle look.