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 18:30:24 +0100 |
commit | 2ef2ac780ee54e14e9c8b89cf7de0a61ccddfad4 (patch) | |
tree | b46a1ce4b0f8c6a4963f502924b26756194abbb3 /src/vnet/ipsec/ipsec_sa.h | |
parent | bb25fbf28c3a6cbe361db74d731d145e868fc716 (diff) |
ipsec: fix AES CBC IV generation (CVE-2022-46397)stable/2106
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 7827ef18084..7d113bfbc2e 100644 --- a/src/vnet/ipsec/ipsec_sa.h +++ b/src/vnet/ipsec/ipsec_sa.h @@ -162,7 +162,7 @@ typedef struct CLIB_CACHE_LINE_ALIGN_MARK (cacheline1); - u64 ctr_iv_counter; + u64 iv_counter; union { ip4_header_t ip4_hdr; |