A search for supersymmetry through the direct pair production of top squarks, with Higgs (H) or Z bosons in the decay chain, is performed using a data sample of proton-proton collisions at root s = 8 TeVcollected in 2012 with the CMS detector at the LHC. The sample corresponds to an integrated luminosity of 19.5 fb(-1). The search is performed using a selection of events containing leptons and bottom-quark jets. No evidence for a significant excess of events over the standard model background prediction is observed. The results are interpreted in the context of simplified supersymmetric models with pair production of a heavier top-squark mass eigenstate (t) over tilde (2) decaying to a lighter top-squark mass eigenstate (t) over tilde (1) via either (t) over tilde (2) -> H (t) over tilde (1) or (t) over tilde (2) -> Z (t) over tilde (1), followed in both cases by (t) over tilde (1) -> t (chi) over tilde (0)(1), where (chi) over tilde (0)(1) is an undetected, stable, lightest supersymmetric particle. The interpretation is performed in the region where the mass difference between the (t) over tilde (1) and (chi) over tilde (0)(1) states is approximately equal to the top-quark mass (m((t) over tilde )1) - m((chi) over tilde 10) similar or equal to m(t)) which is not probed by searches for direct (t) over tilde (1) squark pair production. The analysis excludes top squarks with masses m((t) over tilde2) < 575 GeVand m(<(t)over tilde>1) < 400 GeVat a 95% confidence level. (C) 2014 The Authors. Published by Elsevier B.V.