All the oils will soak into the wood and provide protection against water by coating the fibers with a protective layer that slows down, but does not completely prevent, water from crossing into the cells of the plant materiel. The cells swell up, and the wood expands. Once the oil has polymerized the rate of water crossing is significantly reduced and the oil is more permanently retained. Without crosslinking the oil is greatly more subject to mechanical removal. Some oil is entrained, slowly, from truly non-hardening oil.
Mineral oils are quite different again.
Nor is there a possibility to crosslink. They have a very different chemical structure and are called hydrocarbons. Hydrocarbons derive differences in physical properties by having a different length of molecular chain. Volatile ones are short chains, i.e. gasoline to kerosene, and non-volatile ones are long, i.e. mineral oil to engine oil to tar. The lack of a route to oxidation makes mineral oils very stable, but non-digestible by humans, and even toxic.