Skip to content

ext/phar: harden OpenSSL signature handling in util.c. - #22174

Merged
devnexen merged 1 commit into
php:masterfrom
devnexen:phar_util
May 29, 2026
Merged

ext/phar: harden OpenSSL signature handling in util.c.#22174
devnexen merged 1 commit into
php:masterfrom
devnexen:phar_util

Conversation

@devnexen

Copy link
Copy Markdown
Member

Use size_t in phar_hex_str to avoid signed integer overflow when hex-encoding an attacker-controlled signature length, and fail verification in phar_call_openssl_verify when the stream read is short rather than proceeding over a truncated buffer.

Use size_t in phar_hex_str to avoid signed integer overflow when
hex-encoding an attacker-controlled signature length, and fail
verification in phar_call_openssl_verify when the stream read is
short rather than proceeding over a truncated buffer.
@devnexen
devnexen marked this pull request as ready for review May 28, 2026 21:00

@iluuu1994iluuu1994 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me.

@devnexen
devnexen merged commit be41c36 into php:masterMay 29, 2026
18 checks passed
@devnexen
devnexen deleted the phar_util branch May 29, 2026 12:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@devnexen@iluuu1994@Girgias