[pull] master from php:master#1029
Merged
Merged
Conversation
ZEND_TRACK_ARENA_ALLOC selects an alternative zend_arena struct layout for AddressSanitizer, but it was only appended to the core CFLAGS, never recorded in php_config.h. Extensions built separately with phpize inherit php_config.h rather than the core CFLAGS, so they compiled the untracked layout while core used the tracked one. Destroying a core-created arena from such an extension leaked every tracked allocation. Define it with AC_DEFINE so core and extensions agree on the layout. Fixes GH-22422
pdo_firebird_handle_factory() raised a ValueError for an out-of-range TRANSACTION_ISOLATION_LEVEL but only set ret = 0; zend_value_error() queues the exception without aborting, so control fell through into the isc_attach_database() block, opened the connection and overwrote ret with 1. The constructor then returned success with a pending ValueError and a live handle whose isolation level was never selected. Break out of the attach block when an exception is pending and skip the trailing fb_interpret() error so the ValueError is the sole result; the existing !ret cleanup closes the unused handle. Closes GH-22430
* PHP-8.4: Fix invalid Firebird isolation level proceeding with the connection
* PHP-8.5: Fix invalid Firebird isolation level proceeding with the connection
dblib_handle_last_id() stored the DBINT return of dbconvert() into a size_t len. dbconvert() returns -1 on conversion failure, which sign-extends to SIZE_MAX and is passed as the length to zend_string_init(), reading far past the 40-byte buffer and requesting a SIZE_MAX allocation. Hold the result in a DBINT and bail on a negative return, matching the failure-returns-NULL handling already used for dbresults()/dbnextrow()/dbdatlen() earlier in the function. Closes GH-22428
* PHP-8.4: Fix signed dbconvert() return stored into size_t in dblib lastInsertId
* PHP-8.5: Fix signed dbconvert() return stored into size_t in dblib lastInsertId
php_posix_group_to_array() passed gr_name straight to add_assoc_string() with no NULL guard, so a NULL group name segfaults via zend_string_init(), while the sibling gr_passwd field right below is already guarded. glibc's files NSS backend normalizes empty fields to "", but third-party NSS modules (nss-systemd, nss-ldap, sssd and other directory backends) populate struct group directly and may leave gr_name NULL. Guard it and emit null instead, matching the existing gr_passwd handling. Closes GH-22433
* PHP-8.4: Fix posix_getgrnam()/posix_getgrgid() crash on NULL group name
* PHP-8.5: Fix posix_getgrnam()/posix_getgrgid() crash on NULL group name
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )