Skip to content

offset overflow phar extractTo() #17518

Closed

Description

@YuanchengJiang

Description

The following code:

<?php
$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php';
$phar = new Phar($fname);
$fusion = $phar;
$fusion->extractTo(__DIR__ . "/bug81490", "");

Resulted in this output:

/home/phpfuzz/WorkSpace/flowfusion/php-src/ext/phar/phar_object.c:4330:20: runtime error: addition of unsigned offset to 0x603000001438 overflowed to 0x603000001437
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/phpfuzz/WorkSpace/flowfusion/php-src/ext/phar/phar_object.c:4330:20

PHP Version

nightly

Operating System

No response

Activity

  1. self-assigned this
    on Jan 19, 2025
  2. added a commit that references this issue on Jan 19, 2025
    173471f
  3. added a commit that references this issue on Jan 19, 2025
    eab209d
  4. added 2 commits that reference this issue on Jan 19, 2025
    7cc8719
    b8ee4c2
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