Nothing Special   »   [go: up one dir, main page]

Skip to content
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

Access null pointer in Zend/Optimizer/zend_inference.c #15661

Closed
YuanchengJiang opened this issue Aug 30, 2024 · 1 comment
Closed

Access null pointer in Zend/Optimizer/zend_inference.c #15661

YuanchengJiang opened this issue Aug 30, 2024 · 1 comment

Comments

@YuanchengJiang
Copy link

Description

The following code:

<?php
require_once 'files/phar_oo_test.inc';
?>

Resulted in this output:

/php-src/Zend/Optimizer/zend_inference.c:5043:46: runtime error: applying non-zero offset 36 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/Zend/Optimizer/zend_inference.c:5043:46

To reproduce:

-d "zend_extension=/php-src/modules/opcache.so" -d "opcache.enable=1" -d "opcache.enable_cli=1" -d "opcache.jit=1202"

PHP Version

PHP 8.4.0-dev

Operating System

ubuntu 22.04

@nielsdos
Copy link
Member

This is the ssa_op + 1 computation. The ssa op is not actually used but we should still guard the addition with a NULL check.

nielsdos added a commit that referenced this issue Sep 9, 2024
* PHP-8.2:
  Fix GH-15661: Access null pointer in Zend/Optimizer/zend_inference.c
nielsdos added a commit that referenced this issue Sep 9, 2024
* PHP-8.3:
  Fix GH-15661: Access null pointer in Zend/Optimizer/zend_inference.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants