Merge "xfrm: validate template mode"

This commit is contained in:
Linux Build Service Account 2018-10-15 14:12:37 -07:00 committed by Gerrit - the friendly Code Review server
commit 053e6bf3f6

View file

@ -1404,6 +1404,9 @@ static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family)
(ut[i].family != prev_family))
return -EINVAL;
if (ut[i].mode >= XFRM_MODE_MAX)
return -EINVAL;
prev_family = ut[i].family;
switch (ut[i].family) {