Fix Aes-xts potential failure on aarch64
authorXiaokangQian <xiaokang.qian@arm.com>
Tue, 13 Oct 2020 09:53:58 +0000 (09:53 +0000)
committerTomas Mraz <tmraz@fedoraproject.org>
Tue, 20 Oct 2020 11:45:01 +0000 (13:45 +0200)
Add return value for aarch64 in the init key function.
This will avoid overwriting the stream pointers of aarch64.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13133)

providers/implementations/ciphers/cipher_aes_xts_hw.c

index 15c136bafd8ca8b06f5aa3d679525e99e69a8986..c45d67b825b1c834e2d5fb048f24296193d0f057 100644 (file)
@@ -59,6 +59,7 @@ static int cipher_hw_aes_xts_generic_initkey(PROV_CIPHER_CTX *ctx,
         XTS_SET_KEY_FN(HWAES_set_encrypt_key, HWAES_set_decrypt_key,
                        HWAES_encrypt, HWAES_decrypt,
                        stream_enc, stream_dec);
+        return 1;
     } else
 #endif /* HWAES_CAPABLE */