Skip to content

20260501-fips-v7-fixes#10396

Merged
douzzer merged 2 commits intowolfSSL:masterfrom
douzzer:20260501-fips-v7-fixes
May 5, 2026
Merged

20260501-fips-v7-fixes#10396
douzzer merged 2 commits intowolfSSL:masterfrom
douzzer:20260501-fips-v7-fixes

Conversation

@douzzer
Copy link
Copy Markdown
Contributor

@douzzer douzzer commented May 5, 2026

fixes for wolfssl/fips#379 and related:

linuxkm/Makefile, linuxkm/linuxkm-fips-hash-wrapper.sh, linuxkm/linuxkm_memory.c: refactor coreKey extraction to use ELF tools rather than WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE and user_settings.h.

linuxkm/module_hooks.c: add stack measurement for wc_RunAllCast_fips().

tests/api/test_slhdsa.c: frivolous initialization to work around a false positive -Wmaybe-uninitialized in slhdsa_der_roundtrip_one().

wolfcrypt/src/wc_slhdsa.c, wolfssl/wolfcrypt/wc_slhdsa.h:

  • refactor lifecycle management for SHA-2 objects to fix a leak via wc_SlhDsaKey_CheckKey().
  • add support for WC_SLHDSA_NO_ASM.
  • add WOLFSSL_SLHDSA_VERIFY_ONLY gates around prototypes, to get compile-time failures for misuse.

wolfcrypt/test/test.c:

  • clean up myFipsCb() and restore usability of TEST_ALWAYS_RUN_TO_END with bad FIPS hash (useful test coverage).
  • add wc_RunAllCast_fips() to wolfcrypt_test().
  • when WOLFSSL_KERNEL_MODE or BENCH_EMBEDDED, force on WOLFSSL_SLHDSA_VERIFY_ONLY unless WOLFSSL_SLHDSA_FORCE_FULL_TESTS is defined.

wolfssl/wolfcrypt/settings.h:

  • add WC_MLKEM_NO_ASM to WOLFSSL_LINUXKM section to work around asm bug.
  • remove clause in WOLFSSL_KERNEL_MODE section that forced on WOLFSSL_SLHDSA_VERIFY_ONLY.

tested in conjunction with wolfssl/fips#379 using

wolfssl-multi-test.sh ...
check-source-text-fips-dev
sp-all-asm-smallstack-sanitizer-fips-140-3-dev
fips-140-3-ready-optest-acvp-sp-asm
fips-140-3-dev-optest-acvp-sp-asm
fips-140-3-dev-optest-acvp-sp-asm-trace-errcodes
fips-140-3-dev-optest-acvp-sp-noasm
fips-140-3-dev-optest-acvp-sp-fastmath
fips-140-3-dev-optest-acvp-sp-heapmath
fips-140-3-dev-optest-acvp-sp-asm-gcc-latest
fips-140-3-dev-optest-acvp-sp-asm-gcc-latest-no-sha-1
all-crypto-only-intelasm-fips-dev-linuxkm-next-insmod-optest

Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #10396

Scan targets checked: linuxkm-bugs, linuxkm-src, wolfcrypt-bugs, wolfcrypt-src

No new issues found in the changed files. ✅

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

MemBrowse Memory Report

No memory changes detected for:

douzzer added 2 commits May 5, 2026 11:02
linuxkm/Makefile, linuxkm/linuxkm-fips-hash-wrapper.sh, linuxkm/linuxkm_memory.c: refactor coreKey extraction to use ELF tools rather than WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE and user_settings.h.

linuxkm/module_hooks.c: add stack measurement for wc_RunAllCast_fips().

tests/api/test_slhdsa.c: frivolous initialization to work around a false positive -Wmaybe-uninitialized in slhdsa_der_roundtrip_one().

wolfcrypt/src/wc_slhdsa.c,  wolfssl/wolfcrypt/wc_slhdsa.h:
* refactor lifecycle management for SHA-2 objects to fix a leak via wc_SlhDsaKey_CheckKey().
* add support for WC_SLHDSA_NO_ASM.
* add WOLFSSL_SLHDSA_VERIFY_ONLY gates around prototypes, to get compile-time failures for misuse.

wolfcrypt/test/test.c:
* clean up myFipsCb() and restore usability of TEST_ALWAYS_RUN_TO_END with bad FIPS hash (useful test coverage).
* add wc_RunAllCast_fips() to wolfcrypt_test().
* when WOLFSSL_KERNEL_MODE or BENCH_EMBEDDED, force on WOLFSSL_SLHDSA_VERIFY_ONLY unless WOLFSSL_SLHDSA_FORCE_FULL_TESTS is defined.

wolfssl/wolfcrypt/settings.h:
* add WC_MLKEM_NO_ASM to WOLFSSL_LINUXKM section to work around asm bug.
* remove clause in WOLFSSL_KERNEL_MODE section that forced on WOLFSSL_SLHDSA_VERIFY_ONLY.
@douzzer douzzer force-pushed the 20260501-fips-v7-fixes branch from 85b51b3 to d93a5ee Compare May 5, 2026 16:03
@douzzer
Copy link
Copy Markdown
Contributor Author

douzzer commented May 5, 2026

retest this please
(git fetch timeout)

@douzzer douzzer merged commit c1b2660 into wolfSSL:master May 5, 2026
447 of 458 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants