SN1 or SN2 reaction?
This reaction will happen by both SN1 and SN2 mechanism, apart from this SN1' and Sn2' (allylic mechanism ) will also occur. Thus from SN1 and Sn2 one will get primary cyanide and from SN1' and SN2' one will get secondary cyanide .( read organic chemistry by jerry march for the detailed explanation). 
I am attaching a screenshot of clayden which explains this beautifully.