Bill got it right
There should be no water entering your cabin from your deck stepped mast. First check the overhead in the cabin around the mast step and compression post. Is it deformed around the compression post? If so, this indicates that the deck core under the step is rotted, which requires a major repair to replace the core.
If not, then you will need a mast crane to diagnose and hopefully fix the problem. With the crane supporting the mast at the spreaders, detach your stays, and raise the mast about a foot above the "boot" on which it rests. Check the sealing of the plastic tube with the cables running through it, and of the bolts that hold the boot to the deck. You may have to undo the bolts and remove the boot to complete this repair.
Address this issue now, since leaking water will get into the deck core, and begin rot if it has not already.
By the way, we knew that the core under our mast step was rotted when we bought it, and had a fiberglass shop repair it before our second summer. They substituted an aluminum plate for the wooden core, and 13 years later, there is no sign of recurrence! It cost about $1,100 in 2001. This is a feasible do it yourself project, and there are a number of accounts of the work in the archives.