mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-10 21:10:49 +02:00
b680985328
A second apple-M1 FIPS segfault (--enable-fips=v5): test_wc_AesCcmArgMcdc probes the pure-C CCM inSz-overflow decision by calling wc_AesCcmEncrypt/Decrypt with a 1-byte dummy in/out buffer and a claimed length of 65536, relying on the pure-C path returning AES_CCM_OVERFLOW_E *before* touching the buffer. The FIPS module's CCM does not reject early, so it writes 65536 bytes into the 1-byte buffer and segfaults. (The rounds=0 corruption in the same test was already skipped via WC_TEST_AES_ROUNDS_OFFLOADED, but the two overflow blocks were not.) Every decision this test targets lives in pure-C aes.c CCM code that is not compiled in FIPS/self-test builds, so guard the whole function on !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) rather than patching each unsafe block. The other *ArgMcdc tests only corrupt rounds (macro-skipped) and have no oversized-buffer calls, so they need no further change. Verified: --enable-all still builds and test_wc_AesCcmArgMcdc passes; the 65536 overflow calls are present non-FIPS and absent when HAVE_FIPS is defined.
Before creating any new configure files (.conf) read the CONF_FILES_README.md