php-src/.github
Niels Dossche 00c6d538ab
Fix GH-13834: Applying non-zero offset 36 to null pointer in zend_jit.c (#13846)
* Fix GH-13834: Applying non-zero offset 36 to null pointer in zend_jit.c

ssa_op can be NULL in function JIT. Doing pointer arithmetic on a NULL
pointer is undefined behaviour. Undefined behaviour can be dangerous
because the optimizer may assume then that the variable is not actually
NULL.

To solve this:
1. Add ADVANCE_SSA_OP() to safely add an offset to ssa_op in zend_jit.c
2. For inference, add an extra offset argument to the helper functions.

To reproduce this, use Clang (not GCC) on a test like
sapi/cli/tests/gh12363.phpt (or other tests also work).

* Remove -fno-sanitize=pointer-overflow flag from CI

* Fix NULL pointer offsets added to the stack_map

* Fix an offset add on a potentially NULL ssa->ops

* Fix NULL pointer arithmetic in zend_range_info()

* Address review comments
2024-04-01 13:37:15 +02:00
..
actions ext/openssl: Remove kerberos support 2024-03-23 15:12:06 +00:00
ISSUE_TEMPLATE [skip ci] Remove the link to the custom bugs tracker from the new issue window (#11538) 2023-08-31 15:52:57 +02:00
scripts Follow-up to remove IMAP ext (#13248) 2024-02-09 21:32:07 +09:00
workflows Fix GH-13834: Applying non-zero offset 36 to null pointer in zend_jit.c (#13846) 2024-04-01 13:37:15 +02:00
CODEOWNERS [skip ci] CODEOWNERS 2024-03-14 07:47:53 +09:00
labeler.yml CI: Fix labeler.yml file to support actions/labeler@v5 (#13459) 2024-02-21 18:53:14 +01:00
lsan-suppressions.txt Suppress snmp lib memory leak, xfail ASAN tests 2023-03-27 16:38:44 +02:00
nightly_matrix.php [skip ci] Skip JIT tests for Apple Silicon + ZTS 2024-02-18 00:19:47 +01:00
setup_hmailserver.php Follow-up to remove IMAP ext (#13248) 2024-02-09 21:32:07 +09:00