20241025-fixes#8114
Merged
SparkiDev merged 1 commit intowolfSSL:masterfrom Oct 28, 2024
Merged
Conversation
43b9909 to
04fdea1
Compare
wolfcrypt/src/port/arm/armv8-aes.c: in the WOLFSSL_ARMASM_NO_HW_CRYPTO version of wc_AesSetKey(), copy the supplied userKey to a properly aligned buffer if necessary before calling AES_set_encrypt_key(); src/dtls13.c: in Dtls13GetRnMask(), if defined(WOLFSSL_LINUXKM)), return retval of wc_AesEncryptDirect(); wolfcrypt/src/misc.c: add readUnalignedWord32(), writeUnalignedWord32(), readUnalignedWords32(), and writeUnalignedWords32(); wolfcrypt/src/siphash.c: use readUnalignedWord64(), readUnalignedWord32(), and writeUnalignedWord64(), to avoid unaligned access faults, and fix cast in byte-reversing version of GET_U32().
04fdea1 to
6f87f57
Compare
dgarske
approved these changes
Oct 28, 2024
Member
dgarske
left a comment
There was a problem hiding this comment.
This fixes the wolfCrypt test issue with ARMARM using arm32 (not thumb) that I reproduced with -Os on STM32H7.
SparkiDev
approved these changes
Oct 28, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes for gating and ARM32 alignment defects:
wolfcrypt/src/port/arm/armv8-aes.c: in theWOLFSSL_ARMASM_NO_HW_CRYPTOversion ofwc_AesSetKey(), copy the supplieduserKeyto a properly aligned buffer if necessary before callingAES_set_encrypt_key();src/dtls13.c: inDtls13GetRnMask(), ifdefined(WOLFSSL_LINUXKM), return retval ofwc_AesEncryptDirect();wolfcrypt/src/misc.c: addreadUnalignedWord32(),writeUnalignedWord32(),readUnalignedWords32(), andwriteUnalignedWords32();wolfcrypt/src/siphash.c: usereadUnalignedWord64(),readUnalignedWord32(), andwriteUnalignedWord64(), to avoid unaligned access faults, and fix cast in byte-reversing version ofGET_U32().tested with
wolfssl-multi-test.sh ... linuxkm-all-fips-140-3 quantum-safe-wolfssl-all-cross-armv7a-armasm-unittest-Os quantum-safe-wolfssl-all-cross-armv7a-armasm-unittest-Os-smallstack quantum-safe-wolfssl-all-cross-armv7a-armasm-unittest-sanitizer-Os-smallstack quantum-safe-wolfssl-all-intelasm-sp-asm-valgrind-Os super-quick-check