I know this will raise some eyebrows, but it worked really well on the stock. My 91/30 Mosin looked as though it had been kept in a vat of Cosmoline, I tried most of the remedies posted above, but the goo still was in the wood. Finally, in desperation a guy told me that gasoline melts the stuff. I went to the local parts store and purchased a pack of rags, then out in the back yard soaked one with the gas I use for the lawnmower. This really pulled the Cosmoline out of the wood. I went through a dozen foot x foot squares, but the end result was great. You will need to neutralize the gasoline, but any household cleaner will do fine. The proof is when you take a piece of sandpaper to the stock. Unless all the cosmoline is gone the paper will quickly gum up. If its gone all you get is fine wood dust.
KKKKFL