The magnets themselves are ceramic, the same ceramic that almost all impeller magnets are made from and they cannot rust. One of two things is at play here. Either something iron that could rust was attracted to the magnets, this could be some iron filings, steel wool, a staple etc, anything it may have picked up at some point. It is most commonly bits of iron based phosphate remover which it has picked up. The other possibility which is far less common is that the ferrite magnets sit on an iron plate, this plate is coated by polyurethane, it can have a breach where saltwater gets to the plate and the plate rusts, but usually then you can see a single pin hole source of the rust.