Lords Test: Australia cling on to draw despite Archer, Leach heroics
Earlier, World Cup final hero Stokes helped the hosts drag themselves out of a hole and post a total of 258/5 before skipper Joe Root decided to declare.
This was Stokes' seventh Test hundred.
For Australia, who lost key batsman Smith after he was diagnosed with concussion caused by a blow to his neck from England seamer Jofra Archer on Day 4, Cummins was the pick of the bowlers with figures of 3/35.
Archer, who bowled a fiery spell in the first innings picking up two wickets, had out-of-form Warner (5) caught at gully by Rory Burns and in his next over, sent back Khawaja (2) with a caught behind.
At the start of a rip-roaring final day of Test cricket, Stokes, who was 16 not out and Buttler unbeaten on 10, stitched together a 90-run stand for the fifth wicket before Cummins dismissed the latter.
Jonny Bairstow (30 not out) and Stokes then took England to a score where Root felt it would be safe to declare and try and push for a win.
Smith woke up on Sunday morning with "a bit of a headache and grogginess", said a statement issued by Cricket Australia (CA).
He was forced to retire on Saturday while batting on 80 after being hit by the Archer bouncer. However, he cleared a concussion test and returned to the crease before being dismissed for 92. Another concussion test was conducted before the fifth day's play as per CA protocol, which "demonstrated some deterioration from his testing which is consistent with the emergence of the symptoms he was reporting".
"On that basis Steve has been withdrawn from the match by team doctor Richard Saw and the Australia team will lodge an application for a concussion substitute with the ICC match referee in line with the ICC protocol.
"In terms of Steve's availability for the third Test, this will be considered over the coming days but the short turnaround to the next Test is not in his favour. Steve's fitness will be assessed on an ongoing basis. Steve will undergo a precautionary scan on his neck on Sunday," the CA statement said.
Brief scores: 1st innings: England 258 all out; Australia: 250 all out. 2nd innings: England: 258/5 decl (Ben Stokes 115 not out; Pat Cummins 3/35); Australia 154/6 (M Labuschagne 59, Travis Head 42 not out; Jofra Archer 3/32, Jack Leach 3/37) Match tied.