Iraqi authorities say gunmen have ambushed and killed 12 Iraqi soldiers near the northern city of Kirkuk .