Skip to content

Reject excessively large FTP control replies (#2434)#2437

Merged
kinkie merged 2 commits into
squid-cache:v7from
squidadm:v7-backport-pr2434
Jun 7, 2026
Merged

Reject excessively large FTP control replies (#2434)#2437
kinkie merged 2 commits into
squid-cache:v7from
squidadm:v7-backport-pr2434

Conversation

@squidadm
Copy link
Copy Markdown
Collaborator

@squidadm squidadm commented Jun 7, 2026

When parsing FTP control replies, Ftp::Client::parseControlReply()
stores individual lines in the ctrl.message wordlist. The stored
values are later combined, appended, encoded, and/or converted to String
objects, exposing the results to String::SizeMax_ limitations. Recent
commit 46f3f80 already ensures reply_header_max_size limits for
control replies. This change adds checks for cases where
reply_header_max_size configuration exceeds the recommended maximum
value. It also protects any sensitive worldlist-manipulating code that
might become reachable before reply_header_max_size limit is checked.

Excessively large FTP control replies now lead to ERR_FTP_FAILURE.

This is a Measurement Factory project.

somecookie and others added 2 commits June 7, 2026 20:34
When parsing FTP control replies, `Ftp::Client::parseControlReply()`
stores individual lines in the `ctrl.message` wordlist. The stored
values are later combined, appended, encoded, and/or converted to String
objects, exposing the results to `String::SizeMax_` limitations. Recent
commit 46f3f80 already ensures `reply_header_max_size` limits for
control replies. This change adds checks for cases where
`reply_header_max_size` configuration exceeds the recommended maximum
value. It also protects any sensitive worldlist-manipulating code that
might become reachable before `reply_header_max_size` limit is checked.

Excessively large FTP control replies now lead to ERR_FTP_FAILURE.

This is a Measurement Factory project.
@kinkie kinkie merged commit 03214c4 into squid-cache:v7 Jun 7, 2026
9 of 10 checks passed
This was referenced Jun 7, 2026
yadij pushed a commit that referenced this pull request Jun 8, 2026
Fix a typo in ChangeLog from PR #2437
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants