[php-src] PR #22017: sapi/cli: guard Content-Length overflow and enforce post_max_size
| From: | iliaal | Date: | Tue, 12 May 2026 00:29:45 +0000 |
| Subject: | [php-src] PR #22017: sapi/cli: guard Content-Length overflow and enforce post_max_size | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36094@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22017
Author: iliaal
The dev server crashes when Content-Length wraps ssize_t (30+ digit value), or when a legitimately
large Content-Length passes pemalloc and aborts the process.
Guard the parser's Content-Length and chunked-size accumulators against SSIZE_MAX, then reject
oversize Content-Length in on_headers_complete and reply 413 with the configured post_max_size in
the body.
Fixes #22003