Rising food and housing costs drove UK inflation back to a 40-year high in September.