Skip to content

Heap use-after-free in phpdbg (zend_hash.c:57 in _zend_is_inconsistent) #15210

Closed

Description

@YuanchengJiang

Description

The following code:

<?php
header_register_callback(function() { echo "sent";});
$a = [0];
$a[0] = 1;
$b = &$a;
$a[0] = 2;
$a[1] = 3;
$c = [1];
$b = &$c;
?>

Resulted in this output:

Segmentation fault (core dumped)

To reproduce:

phpdbg ./test.php
> b 4
> r
> w $a[0]
> w r $b
> c
> q

(I guess the bug for phpdbg might not be exploitable? so I make it public)

PHP Version

PHP 8.4.0-dev

Operating System

ubuntu 22.04

Activity

  1. devnexen commented on Aug 3, 2024

    @devnexen
    Member

    Thanks I ll try to have a look within the next days both phpdbg issues.

  2. self-assigned this
    on Aug 3, 2024
  3. added a commit that references this issue on Aug 9, 2024
    9aeb676
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions