Context. The mass-loss mechanism in red giants and red supergiants is not yet understood well. The SiO fundamental lines near 8 μm are potentially useful for probing the outer atmosphere, which is essential for clarifying the mass-loss mechanism. However, these lines have been little explored until now. Aims. We present high spectral resolution spectroscopic observations of the SiO fundamental lines near 8.1 μm in 16 bright red giants and red supergiants. Our sample consists of seven normal (i.e., non-Mira) K-M giants (from K1.5 to M6.5), three Mira stars, three optically bright red supergiants, two dusty red supergiants, and the enigmatic object GCIRS3 near the Galactic center. Methods. Our program stars were observed between 8.088 μm and 8.112 μm with a spectral resolution of 30 000 using VLT/VISIR. Results. We detected SiO fundamental lines in all of our program stars except for GCIRS3. The SiO lines in normal K and M giants as well as optically bright (i.e., not dusty) red supergiants do not show P-Cyg profiles or blueshifts, which means the absence of systematic outflows in the SiO line forming region. We detected P-Cyg profiles in the SiO lines in the dusty red supergiants VY CMa and VX Sgr, with the latter object being a new detection. These SiO lines originate in the outflowing gas with the thermal dust continuum emission seen as the background. The outflow velocities of the SiO line forming region in VY CMa and VX Sgr are estimated to be 27 km s −1 and 17 km s −1 , respectively. We derived basic stellar parameters (effective temperature, surface gravity, luminosity, and mass) for the normal K-M giants and optically bright red supergiants in our sample and compared the observed VISIR spectra with synthetic spectra predicted from MARCS photospheric models. Most of the SiO lines observed in the program stars warmer than ∼3400 K are reasonably reproduced by the MARCS models, which allowed us to estimate the silicon abundance as well as the 28 Si/ 29 Si and 28 Si/ 30 Si ratios. However, we detected possible absorption excess in some SiO lines. Moreover, the SiO lines in the cooler red giants and red supergiant cannot be explained by the MARCS models at all, even if the dust emission is taken into account. This disagreement may be a signature of the dense, extended molecular outer atmosphere.