diff options
author | Tobias Brunner <tobias@strongswan.org> | 2014-12-01 17:21:59 +0100 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2014-12-23 15:40:01 +0100 |
commit | e13ef5c43416304f0e750af3bb87fd2fad3eee41 (patch) | |
tree | b7a944e1fc76beccf45b3a9352675c0fc0726260 /src/libstrongswan/crypto/diffie_hellman.c | |
parent | 6683cf6a5ad0eeb359de80c56068532116a17f17 (diff) | |
download | strongswan-e13ef5c43416304f0e750af3bb87fd2fad3eee41.tar.bz2 strongswan-e13ef5c43416304f0e750af3bb87fd2fad3eee41.tar.xz |
crypto: Define MODP_CUSTOM outside of IKE DH range
Before this fix it was possible to crash charon with an IKE_SA_INIT
message containing a KE payload with DH group MODP_CUSTOM(1025).
Defining MODP_CUSTOM outside of the two byte IKE DH identifier range
prevents it from getting negotiated.
Fixes CVE-2014-9221.
Diffstat (limited to 'src/libstrongswan/crypto/diffie_hellman.c')
-rw-r--r-- | src/libstrongswan/crypto/diffie_hellman.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libstrongswan/crypto/diffie_hellman.c b/src/libstrongswan/crypto/diffie_hellman.c index bada1c529..ac106e9c4 100644 --- a/src/libstrongswan/crypto/diffie_hellman.c +++ b/src/libstrongswan/crypto/diffie_hellman.c @@ -42,15 +42,16 @@ ENUM_NEXT(diffie_hellman_group_names, MODP_1024_160, ECP_512_BP, ECP_521_BIT, "ECP_256_BP", "ECP_384_BP", "ECP_512_BP"); -ENUM_NEXT(diffie_hellman_group_names, MODP_NULL, MODP_CUSTOM, ECP_512_BP, - "MODP_NULL", - "MODP_CUSTOM"); -ENUM_NEXT(diffie_hellman_group_names, NTRU_112_BIT, NTRU_256_BIT, MODP_CUSTOM, +ENUM_NEXT(diffie_hellman_group_names, MODP_NULL, MODP_NULL, ECP_512_BP, + "MODP_NULL"); +ENUM_NEXT(diffie_hellman_group_names, NTRU_112_BIT, NTRU_256_BIT, MODP_NULL, "NTRU_112", "NTRU_128", "NTRU_192", "NTRU_256"); -ENUM_END(diffie_hellman_group_names, NTRU_256_BIT); +ENUM_NEXT(diffie_hellman_group_names, MODP_CUSTOM, MODP_CUSTOM, NTRU_256_BIT, + "MODP_CUSTOM"); +ENUM_END(diffie_hellman_group_names, MODP_CUSTOM); /** |