Transport of cosmic rays in the solar corona