Re: [Patch net] xfrm: check id proto in validate_tmpl()

2017-11-29 Thread Steffen Klassert
On Mon, Nov 27, 2017 at 11:15:16AM -0800, Cong Wang wrote: > syzbot reported a kernel warning in xfrm_state_fini(), which > indicates that we have entries left in the list > net->xfrm.state_all whose proto is zero. And > xfrm_id_proto_match() doesn't consider them as a match with > IPSEC_PROTO_ANY

[Patch net] xfrm: check id proto in validate_tmpl()

2017-11-27 Thread Cong Wang
syzbot reported a kernel warning in xfrm_state_fini(), which indicates that we have entries left in the list net->xfrm.state_all whose proto is zero. And xfrm_id_proto_match() doesn't consider them as a match with IPSEC_PROTO_ANY in this case. Proto with value 0 is probably not a valid value, at l