The Syrian army said on Saturday dozens of its soldiers had been killed in a major attack by rebels who swept into the city of Aleppo, forcing the army to redeploy in the biggest challenge to President Bashar al-Assad in years.