We calculate stellar masses for \sim 400 , 000 massive luminous galaxies at redshift \sim 0.2 - 0.7  using the first two years of data from the Baryon Oscillation Spectroscopic Survey ( BOSS ) . Stellar masses are obtained by fitting model spectral energy distributions to u,g,r,i,z  magnitudes , and simulations with mock galaxies are used to understand how well the templates recover the stellar mass . Accurate BOSS spectroscopic redshifts are used to constrain the fits . We find that the distribution of stellar masses in BOSS is narrow ( \Delta~ { } \log M \sim 0.5  dex ) and peaks at about \log~ { } M / M _ { \odot } \sim 11.3 ( for a Kroupa initial stellar mass function ) , and that the mass sampling is uniform over the redshift range 0.2 to 0.6 , in agreement with the intended BOSS target selection . The galaxy masses probed by BOSS extend over \sim 10 ^ { 12 } M _ { \odot } , providing unprecedented measurements of the high-mass end of the galaxy mass function . We find that the galaxy number density above \sim 2.5 \cdot 10 ^ { 11 } M _ { \odot } agrees with previous determinations . We perform a comparison with semi-analytic galaxy formation models tailored to the BOSS target selection and volume , in order to contain incompleteness . The abundance of massive galaxies in the models compare fairly well with the BOSS data , but the models lack galaxies at the massive end . Moreover , no evolution with redshift is detected from \sim 0.6 to 0.4 in the data , whereas the abundance of massive galaxies in the models increases to redshift zero . Additionally , BOSS data display colour-magnitude ( mass ) relations similar to those found in the local Universe , where the most massive galaxies are the reddest . On the other hand , the model colours do not display a dependence on stellar mass , span a narrower range and are typically bluer than the observations . We argue that the lack of a colour-mass relation for massive galaxies in the models is mostly due to metallicity , which is too low in the models .