Skip to content

20251202-linuxkm-old-kernel-fixes#9490

Merged
dgarske merged 5 commits intowolfSSL:masterfrom
douzzer:20251202-linuxkm-old-kernel-fixes
Dec 4, 2025
Merged

20251202-linuxkm-old-kernel-fixes#9490
dgarske merged 5 commits intowolfSSL:masterfrom
douzzer:20251202-linuxkm-old-kernel-fixes

Conversation

@douzzer
Copy link
Copy Markdown
Contributor

@douzzer douzzer commented Dec 4, 2025

linuxkm/lkcapi_sha_glue.c: in wc_linuxkm_drbg_generate(), generate randomness in batches that fit in RNG_MAX_BLOCK_LEN. Fixes a potentially destabilizing bug discovered during WolfGuard exercises on kernel 6.12 with /dev/random patches applied.

move WOLFSSL_API_PREFIX_MAPping of GetCAByAKID to wolfSSL_GetCAByAKID from wolfssl/internal.h to wolfssl/wolfcrypt/asn.h, with an additional needed early mapping in linuxkm/linuxkm_wc_port.h. (fixes linuxkm TLS layer builds, broken by #9489.)

linuxkm/linuxkm_wc_port.h:
* add backported definition of static_assert();
* add version-gated include for asm-generic/simd.h;
* add version gate for crypto/internal/simd.h.

linuxkm: move definition of WOLFSSL_DEBUG_PRINTF_FN from wolfssl/wolfcrypt/logging.h to linuxkm/linuxkm_wc_port.h. Fixes --enable-debug-trace-errcodes on kernels >= 5.15.

linuxkm/linuxkm_wc_port.h: add -Wattributes to suppression list while including kernel headers.

tested with

wolfssl-multi-test.sh ...
check-source-text
'linuxkm-legacy-.*'
'.*linuxkm-next.*'
'.*cust-kernel.*'
linuxkm-all-fips-140-3 linuxkm-all-fips-140-3-dyn-hash linuxkm-all-fips-140-3-dev-dyn-hash linuxkm-aesni-sp-asm-pie-insmod-no-ecc521 linuxkm-legacy-4.4-insmod linuxkm-legacy-4.9-insmod linuxkm-legacy-4.14-insmod linuxkm-legacy-4.19-insmod linuxkm-legacy-5.4-insmod linuxkm-legacy-5.10-insmod linuxkm-legacy-5.15-insmod linuxkm-legacy-6.1-insmod linuxkm-legacy-6.6-insmod linuxkm-legacy-6.12-insmod linuxkm-legacy-6.14-insmod linuxkm-mainline-pie linuxkm-mainline-aesni-pie-gcc-latest-insmod linuxkm-crypto-fuzzer-aesni-pie-no-WC_C_DYNAMIC_FALLBACK-gcc-latest-insmod

Comment thread linuxkm/linuxkm_wc_port.h
@sameehj
Copy link
Copy Markdown
Contributor

sameehj commented Dec 4, 2025

Left you a minor comment, other than that all looks good +1

* add backported definition of static_assert();
* add version-gated include for asm-generic/simd.h;
* add version gate for crypto/internal/simd.h.
…crypt/logging.h to linuxkm/linuxkm_wc_port.h.
…ndomness in batches that fit in RNG_MAX_BLOCK_LEN.
@douzzer douzzer force-pushed the 20251202-linuxkm-old-kernel-fixes branch from 329849c to 01a2d7e Compare December 4, 2025 15:36
…AKID to wolfSSL_GetCAByAKID from wolfssl/internal.h to wolfssl/wolfcrypt/asn.h, with an additional needed early mapping in linuxkm/linuxkm_wc_port.h.
@douzzer douzzer force-pushed the 20251202-linuxkm-old-kernel-fixes branch from 01a2d7e to e225bf8 Compare December 4, 2025 15:59
@dgarske dgarske requested a review from sameehj December 4, 2025 16:04
@dgarske dgarske merged commit fd58885 into wolfSSL:master Dec 4, 2025
315 of 316 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