-
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
Engine UAF with reference assign and dtor #17442
Labels
Comments
devnexen
added
Category: Engine
Status: Verified
and removed
Status: Needs Triage
labels
Jan 11, 2025
Needs some good old diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 59d489f7aee..b1237dfc155 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -1298,8 +1298,10 @@ ZEND_API zend_result zend_try_assign_typed_ref_zval_ex(zend_reference *ref, zval
} \
_zv = &ref->val; \
} \
- zval_ptr_dtor(_zv); \
+ zval garbage; \
+ ZVAL_COPY_VALUE(&garbage, _zv); \
ZVAL_STRING(_zv, string); \
+ zval_ptr_dtor(&garbage); \
} while (0)
#define ZEND_TRY_ASSIGN_STRING(zv, string) \
And the others need this too, hm :/ |
nielsdos
changed the title
SEGV Zend/zend_smart_str.c:230
Engine UAF with reference assign and dtor
Jan 11, 2025
nielsdos
added a commit
to nielsdos/php-src
that referenced
this issue
Jan 11, 2025
nielsdos
added a commit
to nielsdos/php-src
that referenced
this issue
Jan 26, 2025
nielsdos
added a commit
to nielsdos/php-src
that referenced
this issue
Jan 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The following code:
Resulted in this output:
PHP Version
nightly
Operating System
No response
The text was updated successfully, but these errors were encountered: