Fix SRTP KDF null-idx crash and X509 DER length hardening#10212
Draft
ColtonWilley wants to merge 1 commit intowolfSSL:masterfrom
Draft
Fix SRTP KDF null-idx crash and X509 DER length hardening#10212ColtonWilley wants to merge 1 commit intowolfSSL:masterfrom
ColtonWilley wants to merge 1 commit intowolfSSL:masterfrom
Conversation
- wolfcrypt/src/kdf.c: Add null idx guard to wc_SRTP_KDF, wc_SRTCP_KDF, wc_SRTP_KDF_kdr_to_idx, and wc_KDF_SRTP_label - src/x509.c: Add derCert->length > INT_MAX check in wolfSSL_X509_get_der and derSz <= 0 check in wolfSSL_i2d_X509
b159a2a to
335c054
Compare
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.
Summary
idxguard towc_SRTP_KDF,wc_SRTCP_KDF,wc_SRTP_KDF_kdr_to_idx, andwc_KDF_SRTP_labelderCert->length > INT_MAXcheck inwolfSSL_X509_get_derandderSz <= 0check inwolfSSL_i2d_X509Note
The SKID buffer overflow fixes (
subjKeyIdSz > CTC_MAX_SKID_SIZEinReqCertFromX509andwolfSSL_sk_X509_OBJECT_deep_copy) are covered by #10181 and #10178 — this PR is complementary to those fixes.