Using spectral-element synthetic seismograms and adjoint methods, we present a finite-frequency sensitivity analysis of traveltimes of seismic waves interacting with the core-mantle boundary (CMB). We focus on reflected and refracted P and S waves that are recorded in seismograms computed using SPECFEM3D_GLOBE. The core-mantle boundary is the most abrupt internal discontinuity of the Earth, marking the solid-fluid boundary between mantle and outer core that strongly affects the dynamics of the Earth's interior. A lot of research has been dedicated to resolving the structure of the CMB interface, however, a high resolution image of topographic variations is still lacking, due to difficulties relating both to observations in seismograms and good understanding of lowermost mantle velocity structure. We select some of the most important and widely used seismic phases, namely ScS, SKS, SKKS, PcP, PKP, PKKP and PcS, given their path through mantle and core and their interactions with CMB. These seismic waves have been widely deployed by investigators, trying to comprehend CMB and lowermost mantle structure. Firstly, we use computed synthetic seismograms with a dominant period of T ≈11s for existing models of CMB topography and compare traveltime perturbations measured by cross-correlation to those predicted using ray theory. We find deviations from a perfect agreement between ray theoretical predictions of time shifts and those measured on synthetics with and without CMB topography. We find that these deviations are generally small when the background velocity model is 1-D, but become larger when a 3-D background model is used, indicating trade-offs between 3-D mantle structure and core-mantle boundary topography. Secondly, we calculate the Fréchet kernels of traveltimes with respect to shear and compressional wavespeeds and the boundary sensitivities with respect to the CMB interface. We observe that the overall sensitivity of the traveltimes is mostly due to volumetric velocity structure and that imprints of CMB on traveltimes are less pronounced. In general, higher frequency data is used for imaging CMB, but the intermediate frequency range used here is compatible with current computational capabilities and provides a first approach to an FWI modelling of deep Earth structure. Our study explains the difficulties relating to inferring CMB topography using traveltimes and provides a gallery of exact, finite-frequency sensitivity kernels. We conclude that imaging of CMB using full-waveform inversion (FWI) techniques and kernels as presented here can improve our understanding of deep Earth structure and trade-off between seismic velocities and boundary topography.