Attosecond x-ray pulses play a crucial role in the study of ultrafast phenomena occurring within inner and valence electrons. To achieve attosecond time-resolution studies and gain control over electronic wave functions, it is crucial to develop techniques capable of generating and synchronizing two-color x-ray pulses at the attosecond scale. In this paper, we present a novel approach for generating attosecond pulse pairs using a dual chirp-taper free-electron laser with bunching inheritance. An electron beam with a sinusoidal energy chirp, introduced by the external laser, passes through the main undulator and afterburner, both with tapers. Two-color x-ray pulses are generated from the main undulator and the afterburner, respectively, with temporal separations of several femtoseconds and energy separations of tens of electron volts. Notably, the afterburner is much shorter than the main undulator due to the bunching inheritance, which reduces the distance between two source points and alleviates the beamline focusing requirements of the two-color pulses. A comprehensive stability analysis is conducted in this paper, considering the individual effects of shot noise from self-amplified spontaneous emission and carrier-envelope phase jitter of the few-cycle laser. The results show that the radiation from the afterburner exhibits excellent stability in the proposed scheme, which is beneficial for x-ray pump-probe experiments. The proposed scheme opens up new possibilities for attosecond science enabled by x-ray attosecond pump-probe techniques and coherent control of ultrafast electronic wave packets in quantum systems. Published by the American Physical Society 2024