photons are considered to have no "rest mass".. but since they never rest, it's ok to treat them as massive particles.
It is "ok" if "ok" can be used as a synonym for "correct"