Skip to content

Fix GH-16267 socket_strerror overflow on argument value. - #16270

Closed
devnexen wants to merge 2 commits into
php:PHP-8.2from
devnexen:gh16267
Closed

devnexen wants to merge 2 commits into
php:PHP-8.2from
devnexen:gh16267

Conversation

@devnexen

@devnexen devnexen commented Oct 6, 2024

Copy link
Copy Markdown
Member

only socket_strerror provides user-supplied value to sockets_strerror handler.

@devnexen devnexen linked an issue Oct 6, 2024 that may be closed by this pull request
only socket_strerror provides user-supplied value to sockets_strerror
handler.
Comment thread ext/sockets/sockets.c Outdated
RETURN_THROWS();
}

if (arg1 < INT_MIN || arg1 > INT_MAX) {

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.

Suggested change
if (arg1 < INT_MIN || arg1 > INT_MAX) {
if (ZEND_LONG_EXCEEDS_INT(arg1)) {

@devnexen devnexen closed this in 8537aa6 Oct 6, 2024
Sign up for free to 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.

UBSan abort in ext/sockets/sockets.c:373

2 participants