Skip to content

Conversation

@cconlon
Copy link
Member

@cconlon cconlon commented Oct 23, 2024

This PR fixes the native JNI X509CheckPrivateKey() function to operate on a copy of the pointer to pkcs8KeyDerArr.

Recent changes in native wolfSSL as of wolfSSL/wolfssl@901384e704#diff-34d62efe7620eac9235c878aafc6716d1ef20a2246a35fac977f34bacce0481cR7315 caused the wolfSSL API wolfSSL_d2i_PKCS8_PKEY() to advance the input key buffer pointer.

Since the pointer can now be advanced, that can cause a crash in JNI when calling ReleaseByteArrayElements() on that pointer.

Fixes https://cloud.wolfssl-test.com/jenkins/job/wolfSSL/job/nightly-FIPSv2-wolfcrypt-jni-ant-test-v2

@JacobBarthelmeh JacobBarthelmeh merged commit 280032d into wolfSSL:master Oct 29, 2024
34 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.

3 participants