[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201230124619.GB30823@breakpoint.cc>
Date: Wed, 30 Dec 2020 13:46:19 +0100
From: Florian Westphal <fw@...len.de>
To: Visa Hankala <visa@...kala.org>
Cc: Florian Westphal <fw@...len.de>,
Steffen Klassert <steffen.klassert@...unet.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] xfrm: Fix wraparound in xfrm_policy_addr_delta()
Visa Hankala <visa@...kala.org> wrote:
> On Tue, Dec 29, 2020 at 05:01:27PM +0100, Florian Westphal wrote:
> > This is suspicious. Is prefixlen == 0 impossible?
> >
> > If not, then after patch
> > mask = ~0U << 32;
> >
> > ... and function returns 0.
>
> With prefixlen == 0, there is only one equivalence class, so
> returning 0 seems reasonable to me.
Right, that seems reasonable indeed.
> Is there a reason why the function has treated /0 prefix as /32
> with IPv4? IPv6 does not have this treatment.
Not that I recall, looks like a bug.
Powered by blists - more mailing lists