A stochastic view of the propagation of galactic cosmic rays