diff options
author | Benoît Ganne <bganne@cisco.com> | 2022-01-18 15:56:41 +0100 |
---|---|---|
committer | Benoît Ganne <bganne@cisco.com> | 2023-02-07 14:34:27 +0100 |
commit | 3c1021a679193475cbee59a717a53ece009e273f (patch) | |
tree | 880c7ea4d46f3237998f62730d4814981c74754f /src/vnet/ipsec/ipsec_sa.h | |
parent | f53edbc3b4e35b368361e0c61b1adf0d5ab70bf7 (diff) |
ipsec: fix AES CBC IV generation (CVE-2022-46397)stable/2005
For AES-CBC, the IV must be unpredictable (see NIST SP800-38a Appendix
C). Chaining IVs like is done by ipsecmb and native backends for the
VNET_CRYPTO_OP_FLAG_INIT_IV is fully predictable.
Encrypt a counter as part of the message, making the (predictable)
counter-generated IV unpredictable.
Fixes: VPP-2037
Type: fix
Change-Id: If4f192d62bf97dda553e7573331c75efa11822ae
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/ipsec_sa.h')
-rw-r--r-- | src/vnet/ipsec/ipsec_sa.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/ipsec/ipsec_sa.h b/src/vnet/ipsec/ipsec_sa.h index 5950d6f53b3..72636368977 100644 --- a/src/vnet/ipsec/ipsec_sa.h +++ b/src/vnet/ipsec/ipsec_sa.h @@ -182,7 +182,7 @@ typedef struct /* Salt used in GCM modes - stored in network byte order */ u32 salt; - u64 gcm_iv_counter; + u64 iv_counter; union { |