Commit 5ce93bd4 authored by Committed by Greg Kroah-Hartman
xfrm: Validate address prefix lengths in the xfrm selector.
[ Upstream commit 07bf7908950a8b14e81aa1807e3c667eab39287a ] We don't validate the address prefix lengths in the xfrm selector we got from userspace. This can lead to undefined behaviour in the address matching functions if the prefix is too big for the given address family. Fix this by checking the prefixes and refuse SA/policy insertation when a prefix is invalid. Fixes: 1da177e4 ("Linux-2.6.12-rc2") Reported-by: Air Icy <email@example.com> Signed-off-by: Steffen Klassert <firstname.lastname@example.org> Signed-off-by: Sasha Levin <email@example.com>
Showing with 12 additions and 0 deletions