[openssl/openssl] b8d71a: pkcs7: null-guard enveloped and signedAndEnveloped...

"'Abel Thomas' via openssl-commits" <[email protected]> Wed, 29 Jul 2026 09:52:35 -0700
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/openssl-4.0/[email protected]>
  Branch: refs/heads/openssl-4.0
  Home:   https://github.com/openssl/openssl
  Commit: b8d71ab41a0286f85e178d521fafe1106ba467b9
      https://github.com/openssl/openssl/commit/b8d71ab41a0286f85e178d521fafe1106ba467b9
  Author: Abel Thomas <[email protected]>
  Date:   2026-07-29 (Wed, 29 Jul 2026)

  Changed paths:
    M crypto/pkcs7/pk7_lib.c
    M test/pkcs7_test.c

  Log Message:
  -----------
  pkcs7: null-guard enveloped and signedAndEnveloped arms in PKCS7_stream

Dereferences of `p7->d.enveloped->enc_data` and
`p7->d.signed_and_enveloped->enc_data` crash with UBSan when the union
member is NULL after parsing a minimal/malformed input. Mirror the guard
added for the signed arm in PR #30351.

Added unit-tests to validate the change.

Fixes: #31682

Reviewed-by: Andrew Dinh <[email protected]>
Reviewed-by: Jakub Zelenka <[email protected]>
MergeDate: Wed Jul 29 16:51:46 2026
(Merged from https://github.com/openssl/openssl/pull/31716)

(cherry picked from commit 32f5a5183c7f55d5dcf42f433d38c5946c1d0b7e)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/openssl-4.0/0297d0-b8d71a%40github.com.