]> git.ipfire.org Git - thirdparty/squid.git/commit
HTCP: Check for too-small packed and too-large unpacked fields (#2164)
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Thu, 11 Sep 2025 23:33:51 +0000 (23:33 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 12 Sep 2025 22:29:46 +0000 (22:29 +0000)
commit2228d481f130e238c41ea470d7e9444894981b54
treebe025ea35e747f215834a487c979862108c1d2b9
parentb51c42a9cb791f4399a856268366a4dc2fcbe670
HTCP: Check for too-small packed and too-large unpacked fields (#2164)

Harden HTCP parsing by checking HTCP fields

- Check packed field lengths and buffer space before reads.
- Guard CLR "reason" when sz < 2; log invalid messages.
- Support old minor==0 layout with safe prefix copy.
- Use early returns and unique_ptr for safer flows.
src/htcp.cc