From: Florian Westphal <fw@strlen.de>
To: Visa Hankala <visa@hankala.org>
Cc: Florian Westphal <fw@strlen.de>,
Steffen Klassert <steffen.klassert@secunet.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH] xfrm: Fix wraparound in xfrm_policy_addr_delta()
Date: Wed, 30 Dec 2020 13:46:19 +0100 [thread overview]
Message-ID: <20201230124619.GB30823@breakpoint.cc> (raw)
In-Reply-To: <20201230115517.iZlNGikD3bKtySfO@hankala.org>
Visa Hankala <visa@hankala.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.
prev parent reply other threads:[~2020-12-30 12:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-29 14:58 [PATCH] xfrm: Fix wraparound in xfrm_policy_addr_delta() Visa Hankala
2020-12-29 16:01 ` Florian Westphal
2020-12-30 12:06 ` Visa Hankala
2020-12-30 12:46 ` Florian Westphal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201230124619.GB30823@breakpoint.cc \
--to=fw@strlen.de \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
--cc=visa@hankala.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).