Skip to content

Fixes for DH agree buffer, digest/CMAC native context lifecycle, RSA-PSS default salt, PBKDF2 JNI errors - #298

Merged
rlm2002 merged 5 commits into
wolfSSL:masterfrom
cconlon:fenrirOct14
Oct 26, 2026
Merged

rlm2002 merged 5 commits into
wolfSSL:masterfrom
cconlon:fenrirOct14

Conversation

@cconlon

@cconlon cconlon commented Oct 14, 2026

Copy link
Copy Markdown
Member

This PR fixes 5 Fenrir issues:

  • F-15081: Size the wc_DhAgree() shared secret buffer to fit the key's prime.
  • F-15030: Free native digest contexts on re-init and release via MessageDigest.native_free().
  • F-15031: Re-key AesCmac after doFinal(), since wc_CmacFinal() frees the native context.
  • F-15032: Verify default-salt RSA-PSS with wc_RsaPSS_VerifyCheck() so the salt length follows the modulus bits.
  • F-15033: Stop the PBKDF2 JNI wrapper on GetByteArrayElements() failure and keep the pending exception.

@cconlon cconlon self-assigned this Oct 14, 2026
Copilot AI balanced review requested due to automatic review settings October 14, 2026 23:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #298

Scan targets checked: wolfcrypt-jni-src, wolfcrypt-jni-bugs
Coverage: 10 of 32 in-scope changed file(s) opened by the reviewer; not opened: jni/include/com_wolfssl_wolfcrypt_Md5.h, jni/include/com_wolfssl_wolfcrypt_Sha.h, jni/include/com_wolfssl_wolfcrypt_Sha224.h, jni/include/com_wolfssl_wolfcrypt_Sha256.h, jni/include/com_wolfssl_wolfcrypt_Sha3.h, jni/include/com_wolfssl_wolfcrypt_Sha384.h, jni/include/com_wolfssl_wolfcrypt_Sha512.h, jni/jni_sha.c, src/main/java/com/wolfssl/wolfcrypt/Sha.java, src/main/java/com/wolfssl/wolfcrypt/Sha224.java and 12 more

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

@cconlon cconlon assigned rlm2002 and unassigned cconlon Oct 14, 2026
Comment thread jni/jni_md5.c
@rlm2002 rlm2002 assigned cconlon and unassigned rlm2002 Oct 23, 2026
@rlm2002
rlm2002 merged commit 1c45da4 into wolfSSL:master Oct 26, 2026
189 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.

5 participants