]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix libntlmauth string parsing on big-endian machines (#2242)
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Sun, 19 Oct 2025 17:33:18 +0000 (17:33 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 19 Oct 2025 18:18:42 +0000 (18:18 +0000)
commit346ff7bbc7e89ff8abdbc80fb7a2e6638162e359
tree701088caac92684a798e375bfbff98309f0a123e
parent1e71bafbd82223c05202acecd4bd6adbf60726b9
Fix libntlmauth string parsing on big-endian machines (#2242)

Prevent off-by-one reads in ntlm_fetch_string(); clamp copies too.
Convert flags with le32toh; validate lengths; ensure NUL-terminate.
cast ntlm string characters to unsigned char explicitly.
Return BlobError on oversized fields to avoid UB.

Combined these changes affect Big-Endian CPU architectures
which will fail to detect ASCII vs UTF encoding properly and
produce invalid strings (including user/password to compare).
lib/ntlmauth/ntlmauth.cc