Skip to content

Fix SRTP KDF null-idx crash and X509 DER length hardening#10212

Draft
ColtonWilley wants to merge 1 commit intowolfSSL:masterfrom
ColtonWilley:fix-skid-overflow-and-null-checks
Draft

Fix SRTP KDF null-idx crash and X509 DER length hardening#10212
ColtonWilley wants to merge 1 commit intowolfSSL:masterfrom
ColtonWilley:fix-skid-overflow-and-null-checks

Conversation

@ColtonWilley
Copy link
Copy Markdown
Contributor

@ColtonWilley ColtonWilley commented Apr 13, 2026

Summary

  • 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

Note

The SKID buffer overflow fixes (subjKeyIdSz > CTC_MAX_SKID_SIZE in ReqCertFromX509 and wolfSSL_sk_X509_OBJECT_deep_copy) are covered by #10181 and #10178 — this PR is complementary to those fixes.

@ColtonWilley ColtonWilley marked this pull request as draft April 13, 2026 23:45
- 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
@ColtonWilley ColtonWilley force-pushed the fix-skid-overflow-and-null-checks branch from b159a2a to 335c054 Compare April 14, 2026 00:51
@ColtonWilley ColtonWilley changed the title Fix SKID buffer overflow in CSR path and add missing NULL checks Fix SRTP KDF null-idx crash and X509 DER length hardening Apr 14, 2026
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.

1 participant