Using state of the art methods of quantum chemistry, potential energy surfaces for the formation of CO, ((1)Sigma(g)(+)) and CO2 (B-3(2)) from CO + O ((3)p), from CO + O (D-1) and, respectively, have been studied. At the MRSDCI level, we show that the formation of CO2 ((1)Sigma(g)(+)) from O ((3)p) is strongly connected with the height of the barrier localized on the CO + O (P-3) entrance channel. At the CCSD(T) level with a large basis set we calculate this barrier to be 5.9 kcal/mol. Consequently, we confirm that the gas-phase formation of CO2 in interstellar molecular clouds is inefficient. To mimic the formation of CO2 through the Eley Rideal mechanism, on the water ice surfaces of interstellar grains, we have extended our study to consider the formation of CO2 in the presence of water molecules. We show, using density functional and CCSD(T) methods, that the barrier located on the CO + O (P-3) reaction entrance channel is hardly affected by the presence of water molecules. We therefore suggest that CO2 formation, through the Eley-Rideal mechanism, on the water ice surfaces of interstellar grains, should be inefficient too. (c) 2005 Elsevier B.V. All rights reserved.