20260720-linuxkm-CMAC-native#10980
Open
douzzer wants to merge 16 commits into
Open
Conversation
|
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #10980
Scan targets checked: linuxkm-bugs, linuxkm-src, wolfcrypt-bugs, wolfcrypt-rs-bugs, wolfcrypt-src, wolfssl-bugs, wolfssl-src
Findings: 5
5 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
Contributor
|
Retest this please. |
douzzer
commented
Jul 23, 2026
…ment linuxkm cmac(aes) glue.
…leaks: * separate WC_LINUXKM_SHA_IMPLEMENT() into WC_LINUXKM_SHA1_IMPLEMENT() (no fixes needed) and WC_LINUXKM_SHA2_IMPLEMENT() (with associated new helpers WC_LINUXKM_SHA2_FREE_W(), WC_LINUXKM_SHA2_DECL_W(), WC_LINUXKM_SHA2_PUSH_W(), and WC_LINUXKM_SHA2_POP_W(), that move .W to a stack buffer). * Reimplement SHA-2 one-shot digest callback to use only direct wolfCrypt calls rather than proxy to other callbacks.
…ecks on kernel struct wolfSSL_Mutex in WOLFSSL_LINUXKM_VERBOSE_DEBUG builds.
…TfmCtx, adding km_sha3_init_tfm(), km_sha3_exit_tfm(), km_sha3_alloc_tstate(), and km_sha3_free_tstate(), implementing garbage collection of abandoned shash_desc objects at .exit_tfm.
…ment km_sha3_export() and per-alg _import() methods, and km_sha3_test_export_import().
* add to struct km_sha_hmac_pstate members desc_list_lock, desc_list, export_list, and export_list_len; * add struct km_sha_hmac_export_state; * add km_hmac_alloc_tstate(), km_hmac_export(), km_hmac_import(), km_hmac_test_export_import(); * and update km_hmac_*() and WC_LINUXKM_HMAC_IMPLEMENT(() to implement.
… conjunctions to fix constant-folding-provoked compiler warnings around fips_enabled; for clarity, rename internal macros WC_LINUXKM_HAVE_SELFTEST and WC_LINUXKM_HAVE_SELFTEST_FULL to WC_LINUX_CONFIG_SELFTESTS and WC_LINUX_CONFIG_SELFTESTS_FULL respectively.
…hten up SHA-3 allocations, avoiding frivolous struct km_sha_state (with inline wc_Sha512) for SHA-3.
* Eliminate pointer from export blob, replacing it with a TFM-specific random cookie and per-desc serial ID. * Fixes kernel address disclosure risk, handle forgery risk, cross-TFM confusion risk, and heap pointer reuse risk.
…sl/wolfcrypt/settings.h: * Revert earlier changes adding WC_SHA256_W_SIZE and WC_SHA512_W_SIZE. * Add WC_SHA2_NO_SMALL_STACK to allow the W work buffer to move back onto the stack. * In wolfssl/wolfcrypt/settings.h, define WC_SHA2_NO_SMALL_STACK by default when WOLFSSL_KERNEL_MODE, and add a clause to #undef WOLFSSL_SMALL_STACK when building the SHA-2 implementations. linuxkm/lkcapi_sha_glue.c: * Refactor out superfluous struct km_sha_state. * Clean up some macro dynamics. * Add static asserts on HASH_MAX_STATESIZE to WC_LINUXKM_SHA1_IMPLEMENT() and WC_LINUXKM_SHA2_IMPLEMENT().
…ntegrity check and DRBG.
… SEGV from gcc misoptimization.
douzzer
force-pushed
the
20260720-linuxkm-CMAC-native
branch
from
July 24, 2026 00:13
3e6a2f1 to
d4c3410
Compare
douzzer
commented
Jul 24, 2026
douzzer
commented
Jul 24, 2026
douzzer
commented
Jul 24, 2026
douzzer
commented
Jul 24, 2026
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #10980
Scan targets checked: linuxkm-bugs, linuxkm-src, wolfcrypt-bugs, wolfcrypt-rs-bugs, wolfcrypt-src, wolfssl-bugs, wolfssl-src
Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
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.
Implement glue logic for Linux kernel registration of native
cmac(aes)implementation, and fix gaps in several otherstruct shash_algglue implementations:linuxkm/lkcapi_aes_glue.c,linuxkm/lkcapi_glue.c,configure.ac: implement linuxkmcmac(aes)glue.linuxkm/lkcapi_sha_glue.c: fixsha.Wlifecycle management to prevent leaks:separate
WC_LINUXKM_SHA_IMPLEMENT()intoWC_LINUXKM_SHA1_IMPLEMENT()(no fixesneeded) and
WC_LINUXKM_SHA2_IMPLEMENT()(with associated new helpersWC_LINUXKM_SHA2_FREE_W(),WC_LINUXKM_SHA2_DECL_W(),WC_LINUXKM_SHA2_PUSH_W(),and
WC_LINUXKM_SHA2_POP_W(), that move.Wto a stack buffer).Reimplement SHA-2 one-shot digest callback to use only direct wolfCrypt calls
rather than proxy to other callbacks.
linuxkm/linuxkm_wc_port.h,linuxkm/module_hooks.c: implementmagicchecks on kernelstruct wolfSSL_MutexinWOLFSSL_LINUXKM_VERBOSE_DEBUGbuilds.linuxkm/lkcapi_sha_glue.c: refactor SHA-3 state aroundstruct km_Sha3TfmCtx,adding
km_sha3_init_tfm(),km_sha3_exit_tfm(),km_sha3_alloc_tstate(), andkm_sha3_free_tstate(), implementing garbage collection of abandonedshash_descobjects at
.exit_tfm.linuxkm/lkcapi_sha_glue.c: addstruct km_sha3_export_state, and implementkm_sha3_export()and per-alg_import()methods, andkm_sha3_test_export_import().linuxkm/lkcapi_sha_glue.c: fix export/import for HMAC:struct km_sha_hmac_pstatemembersdesc_list_lock,desc_list,export_list, andexport_list_len;struct km_sha_hmac_export_state;km_hmac_alloc_tstate(),km_hmac_export(),km_hmac_import(),km_hmac_test_export_import();km_hmac_*()andWC_LINUXKM_HMAC_IMPLEMENT() to implement.test/:
NO_DH;test_wc_ed448_import_public()andtest_wc_Ed448DecisionCoverage()for FIPS v6;tests/api/test_sha3.cfor KMAC keysize in FIPS builds.tested with