Re: [PATCH net] xfrm: Fix xfrm sel prefix length validation

From: Herbert Xu
Date: Mon May 20 2019 - 22:52:49 EST


On Mon, May 20, 2019 at 10:30:29PM +0530, Anirudh Gupta wrote:
> Yes, I notice that is the only verification of p->family from userspace.
> However, the underlying conditions added in commit '07bf7908950a',
> validates the selector src/dest prefix len.

You need to check both p->family and p->sel.family.

Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt