Skip to content

[pull] master from php:master#1098

Merged
pull[bot] merged 4 commits into
turkdevops:masterfrom
php:master
Jul 17, 2026
Merged

[pull] master from php:master#1098
pull[bot] merged 4 commits into
turkdevops:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Jul 17, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

iliaal and others added 4 commits July 16, 2026 22:10
php_ftp_dirstream_read() sized the basename copy with
MIN(sizeof(ent->d_name), ZSTR_LEN(basename) - 1) and wrote the terminator at
[tmp_len - 1]. An empty listing line leaves a basename of length 1, so
tmp_len is 0 and the NUL lands one byte before d_name; a slash-only line
leaves length 0, so the subtraction underflows to SIZE_MAX and memcpy() reads
4096 bytes past the interned empty string. The same off-by-one truncated
entry names that do not end in CRLF.

Closes GH-22768
* PHP-8.4:
  ext/standard: fix out-of-bounds access in the ftp:// directory stream
* PHP-8.5:
  ext/standard: fix out-of-bounds access in the ftp:// directory stream
@pull pull Bot locked and limited conversation to collaborators Jul 17, 2026
@pull pull Bot added the ⤵️ pull label Jul 17, 2026
@pull
pull Bot merged commit b5fba85 into turkdevops:master Jul 17, 2026
0 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants