diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2008-04-25 01:41:47 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-01 14:44:33 -0700 |
commit | ec6c4d0ac90344251c631a58493ac680a19eca8a (patch) | |
tree | 078bf592de02e48e95a4f3e8ff174c858bf67e73 /include | |
parent | dc2ee1a436bee6ada5afeedb62dc015ed5553f3d (diff) |
IPSEC: Fix catch-22 with algorithm IDs above 31
[ Upstream commit: c5d18e984a313adf5a1a4ae69e0b1d93cf410229 ]
As it stands it's impossible to use any authentication algorithms
with an ID above 31 portably. It just happens to work on x86 but
fails miserably on ppc64.
The reason is that we're using a bit mask to check the algorithm
ID but the mask is only 32 bits wide.
After looking at how this is used in the field, I have concluded
that in the long term we should phase out state matching by IDs
because this is made superfluous by the reqid feature. For current
applications, the best solution IMHO is to allow all algorithms when
the bit masks are all ~0.
The following patch does exactly that.
This bug was identified by IBM when testing on the ppc64 platform
using the NULL authentication algorithm which has an ID of 251.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/xfrm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 0d255ae008b..97577dec635 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -435,6 +435,9 @@ struct xfrm_tmpl /* May skip this transfomration if no SA is found */ __u8 optional; +/* Skip aalgos/ealgos/calgos checks. */ + __u8 allalgs; + /* Bit mask of algos allowed for acquisition */ __u32 aalgos; __u32 ealgos; |