]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Increment hmac_sha*_vector() maximum num_elem value to 25
authorJouni Malinen <quic_jouni@quicinc.com>
Thu, 24 Aug 2023 14:56:23 +0000 (17:56 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 24 Aug 2023 15:10:47 +0000 (18:10 +0300)
This is needed for FTE MIC calculation for Reassociation Request frmae
when using MLO which could add 15 link addresses into the input data.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/crypto/sha256.c
src/crypto/sha384.c
src/crypto/sha512.c

index 1ad1068649529d37a4c09b0d2743ad9baddc7b17..8e57efc01505900d54671a731eba5a8de645b93a 100644 (file)
@@ -28,11 +28,11 @@ int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
 {
        unsigned char k_pad[64]; /* padding - key XORd with ipad/opad */
        unsigned char tk[32];
-       const u8 *_addr[11];
-       size_t _len[11], i;
+       const u8 *_addr[26];
+       size_t _len[26], i;
        int ret;
 
-       if (num_elem > 10) {
+       if (num_elem > 25) {
                /*
                 * Fixed limit on the number of fragments to avoid having to
                 * allocate memory (which could fail).
index fd84b82b1afac5a95d67813d22606f0dd13743f8..8fd69e2d8bbd8cf374b81520aba42ce2115debe7 100644 (file)
@@ -28,10 +28,10 @@ int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem,
 {
        unsigned char k_pad[128]; /* padding - key XORd with ipad/opad */
        unsigned char tk[48];
-       const u8 *_addr[11];
-       size_t _len[11], i;
+       const u8 *_addr[26];
+       size_t _len[26], i;
 
-       if (num_elem > 10) {
+       if (num_elem > 25) {
                /*
                 * Fixed limit on the number of fragments to avoid having to
                 * allocate memory (which could fail).
index f60a5767234626a4fa61dc24d3e05780a0ffb290..d0b123fb6c6568d604b3c083a393fad4a98ba878 100644 (file)
@@ -28,10 +28,10 @@ int hmac_sha512_vector(const u8 *key, size_t key_len, size_t num_elem,
 {
        unsigned char k_pad[128]; /* padding - key XORd with ipad/opad */
        unsigned char tk[64];
-       const u8 *_addr[11];
-       size_t _len[11], i;
+       const u8 *_addr[26];
+       size_t _len[26], i;
 
-       if (num_elem > 10) {
+       if (num_elem > 25) {
                /*
                 * Fixed limit on the number of fragments to avoid having to
                 * allocate memory (which could fail).