From: David Miller <davem@davemloft.net>
To: herbert@gondor.apana.org.au
Cc: netdev@vger.kernel.org
Subject: Re: [IPSEC]: Avoid undefined shift operation when testing algorithm ID
Date: Wed, 19 Dec 2007 23:44:55 -0800 (PST) [thread overview]
Message-ID: <20071219.234455.79622323.davem@davemloft.net> (raw)
In-Reply-To: <20071220042937.GA18679@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu, 20 Dec 2007 12:29:37 +0800
> [IPSEC]: Avoid undefined shift operation when testing algorithm ID
>
> The aalgos/ealgos fields are only 32 bits wide. However, af_key tries
> to test them with the expression 1 << id where id can be as large as
> 253. This produces different behaviour on different architectures.
>
> The following patch explicitly checks whether ID is greater than 31
> and fails the check if that's the case.
>
> We cannot easily extend the mask to be longer than 32 bits due to
> exposure to user-space. Besides, this whole interface is obsolete
> anyway in favour of the xfrm_user interface which doesn't use this
> bit mask in templates (well not within the kernel anyway).
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Thanks for fixing this bug, patch applied!
next prev parent reply other threads:[~2007-12-20 7:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-20 4:29 [IPSEC]: Avoid undefined shift operation when testing algorithm ID Herbert Xu
2007-12-20 7:44 ` David Miller [this message]
2007-12-20 7:58 ` Jarek Poplawski
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=20071219.234455.79622323.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.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).