Skip to content

Fix GH-24784: openssl_pkcs7_read()/openssl_cms_read() CRLs overwrite - #24785

Closed
adapik wants to merge 1 commit into
php:PHP-8.4from
adapik:openssl-crt-crl-mixup
Closed

adapik wants to merge 1 commit into
php:PHP-8.4from
adapik:openssl-crt-crl-mixup

Conversation

@adapik

@adapik adapik commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Fixes 24784

The certificate and CRL loops both indexed the output array with their own counter, so each CRL replaced the certificate at the same index. Append with add_next_index_zval() instead.

@iliaal iliaal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks

Comment thread NEWS Outdated
after a handshake timeout. (Ilia Alshanetsky)
. Fixed feof() on a TLS stream staying false after a close_notify on Windows.
(Jakub Zelenka)
. Fixed bug GH-24784 (openssl_pkcs7_read() and openssl_cms_read() overwrite

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move it into an OpenSSL subsection under the upcoming 8.4.28 release; otherwise, NEWS attributes the fix to the wrong version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, my bad

…te certificates

The certificate and CRL loops both indexed the output array with their
own counter, so each CRL replaced the certificate at the same index.
Append with add_next_index_zval() instead.
@adapik
adapik force-pushed the openssl-crt-crl-mixup branch from edb8c13 to dfc1790 Compare October 28, 2026 14:06
iliaal pushed a commit to iliaal/php-src that referenced this pull request Oct 28, 2026
* PHP-8.4:
  Fix phpGH-24784: Preserve certificates when reading PKCS7/CMS CRLs (php#24785)
arnaud-lb added a commit to lazerg/php-src that referenced this pull request Oct 29, 2026
* up/PHP-8.6:
  Fix json_encode() reporting false "Recursion detected" after OOM for hooked-property objects (php#24992)
  Fix phpGH-25023: ZEND_CONTAINER_OF() fails to compile with -std=c11 (php#25027)
  Fix flaky FPM test for bug #77023 (php#24999)
  Update GitHub Action workflows to `actions/checkout@v7` (8.6)
  Update GitHub Action workflows to `actions/checkout@v7` (8.5)
  Update GitHub Action workflows to `actions/checkout@v7` (8.4)
  Update GitHub Action workflows to `actions/checkout@v7`
  Fix phpGH-23626: OPcache: orphaned temporaries cause leaks and assertions
  [ci skip] Fix comment
  Fix block pass dropping ZEND_FAST_CALL OP2 definition
  Fix phpGH-23572: JIT calls wrong static method from trait clones
  Fix phpGH-24784: Preserve certificates when reading PKCS7/CMS CRLs (php#24785)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants