[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190322041118.rlsfazd5athg2ucc@gondor.apana.org.au>
Date: Fri, 22 Mar 2019 12:11:18 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
syzbot+0bf0519d6e0de15914fe@...kaller.appspotmail.com,
Steffen Klassert <steffen.klassert@...unet.com>
Subject: Re: [Patch net] xfrm: unify xfrm protocol checks
On Thu, Mar 21, 2019 at 09:06:05PM -0700, Cong Wang wrote:
>
> Good point. Replacing IPSEC_PROTO_ANY with zero should
> work too, but on the other hand, id.proto is still never allowed to
> be any other protocol than these 6 listed, no?
It should never be IPSEC_PROTO_ANY since that's used as a wildcard.
IOW if you're going to tighten up the check for the id.proto filed
in an actual state, you should distinguish between the case of an
ID that's used to add/modify a state vs. an ID that's be used to
query a state. IPSEC_PROTO_ANY and zero should be denied in the
first case and allowed in the second case.
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists