The application of cyber‐physical systems (CPSs) in many areas is threatened by its embedded structure. This paper considers the design of an adaptive controller for linear CPSs against deception attacks. Specifically, a corrective signal is designed to suppress or offset the impact of sensor and actuator attacks, especially when the controller and the correction signal are also attacked. First, an adaptive controller is developed for time‐invariant deception attacks and further extended to time‐varying deception attacks. In each case, state‐independent sensor attacks and input‐independent actuator attacks, as well as state‐dependent sensor attacks and input‐dependent actuator attacks, are discussed. For the considered closed‐loop system with time‐invariant state‐dependent sensor attacks and input‐dependent actuator attacks, the controller the authors developed ensures the asymptotic stability of the systems. For the other three cases of the corresponding system, the controllers are also designed, which ensures uniform ultimate boundedness. Finally, several numerical examples are given to explain the availability of our control scheme.