Officials said 40 others were wounded in the bombing.
It's one of the worst attacks on security forces in recent months.
The bomber was a teenager dressed in a school uniform, according to authorities.
The Pakistani Taliban claims the bomber was a soldier who volunteered to carry out the attack.