-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unreachable program point in zend_hash #17187
Comments
I hit this condition instead /home/dcarlier/Contribs/php-src/Zend/zend_hash.c(1090) : ht=0x7ff72424b6c0 is already destroyed
php: /home/dcarlier/Contribs/php-src/Zend/zend_hash.c:74: void _zend_is_inconsistent(const HashTable *, const char *, int): Assertion `0' failed.
Aborted |
A bunch of different issues: 1) The referenced value is copied without incrementing the refcount. The reason the refcount isn't incremented is because otherwise the array modifications would violate the RC1 constraints. Solve this by copying the reference itself instead and always read the referenced value. 2) No type checks on the array data, so malicious scripts could cause type confusion bugs. 3) Potential overflow when the arrays resize and we access ctag.
@nielsdos would this be a type of bug that could be assigned a CVE or no? |
I don't think so. |
Understood. I do appreciate all of your feedback. |
A bunch of different issues: 1) The referenced value is copied without incrementing the refcount. The reason the refcount isn't incremented is because otherwise the array modifications would violate the RC1 constraints. Solve this by copying the reference itself instead and always read the referenced value. 2) No type checks on the array data, so malicious scripts could cause type confusion bugs. 3) Potential overflow when the arrays resize and we access ctag.
Description
The following code:
Resulted in this output:
ZEND_ASSERT(idx < HT_IDX_TO_HASH(ht->nTableSize));
PHP Version
8.4.1
Operating System
Ubuntu 22.04
The text was updated successfully, but these errors were encountered: