Skip to content

Fix missing AES initialization in krb5 kdf#378

Merged
ColtonWilley merged 1 commit intowolfSSL:masterfrom
night1rider:KDF-missing-aes-init
Apr 2, 2026
Merged

Fix missing AES initialization in krb5 kdf#378
ColtonWilley merged 1 commit intowolfSSL:masterfrom
night1rider:KDF-missing-aes-init

Conversation

@night1rider
Copy link
Copy Markdown
Contributor

The Aes struct in wp_kdf_krb5kdf_derive is never initialized with wc_AesInit. In the unit test (will using FIPs) wc_AesCbcEncrypt de-references uninitialized internal pointers causing a segfault. Additionally wc_AesFree is called unconditionally at the end, so early-exit error paths (wrong key size etc.) also segfault on the uninitialized struct. Not sure if this happens without FIPs but the AES struct should be initialized before possible usage.

@night1rider night1rider self-assigned this Mar 25, 2026
@night1rider night1rider force-pushed the KDF-missing-aes-init branch from 6f85bd0 to 2a71e28 Compare April 2, 2026 19:13
@night1rider
Copy link
Copy Markdown
Contributor Author

Rebased and Force pushed

@ColtonWilley ColtonWilley merged commit 7a01744 into wolfSSL:master Apr 2, 2026
374 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