We consider joint estimation of carrier frequency offset (CFO) and channel impulse response (CIR) for orthogonal frequency division multiplexing (OFDM) with pilot symbols. A new method based on compressed sensing is proposed. It has been shown that the CIR can be represented as a 1-block sparse signal by using a dictionary constructed by concatenating subspaces of CFO values taken from a search space. Recovery of both CFO and CIR is accomplished by the block orthogonal matching pursuit algorithm. The proposed method uses only one OFDM training block and does not require any initialization. The performance of the proposed method is compared against the well-established pilot based estimators: Moose, Classen, the maximum likelihood estimator, and the p-algorithm. Numerical results show that the performance of the proposed method does not depend on the value of the CFO. We also give worst-case upper bounds for the mean squared error of the CIR estimate for a sparse multipath channel.