Buffer Overflow in ext_lm_group_acl helper
The ext_lm_group_acl helper in Squid mishandles buffer management when parsing NTLM authentication credentials, allowing writes outside the credentials buffer. On systems with memory protections this can crash the helper, which also terminates Squid and denies service to all proxy clients.
Originally disclosed on HackerOne
- Triaged in 15 hours
- Fixed in 18 months
- Paid in 18 months
- Disclosed after 18 months
Summary
Due to incorrect buffer management ext_lm_group_acl is vulnerable to a denial of service attack when processing NTLM Authentication credentials. This problem is limited to installations using the ext_lm_group_acl binary.
Affected Versions
Squid 2.x -> 2.7.STABLE9 Squid 3.x -> 3.5.28 Squid 4.x -> 4.9
Severity
Due to incorrect input validation the NTLM authentication credentials parser in ext_lm_group_acl may write to memory outside the credentials buffer. On systems with memory access protections this can result in the helper process being terminated unexpectedly. Resulting in the Squid process also terminating and a denial of service for all clients using the proxy.
Supporting Material/References:
Advisory : http://www.squid-cache.org/Advisories/SQUID-2020_3.txt
Remediation
An official patch is available from the Squid archives for both Squid 3.5 and Squid 4.
Timeline
2019-11-11 : I reported the issue 2019-11-18 : I made a PR on GitHub with a fix 2019-11-22 : Fix was merged
Impact
See 'Severity' section of report.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the NTLM credentials parser in the helper did not validate input length before copying, so it wrote past the end of the credentials buffer.
Impact
On systems with memory access protections the helper process can be terminated, which also terminates Squid and causes a denial of service for all clients using the proxy; the text limits this to installations using the ext_lm_group_acl binary.
What the attacker needed
Squid using ext_lm_group_acl helper; NTLM authentication enabled; Attacker can send crafted NTLM credentials
The fix
A fix was merged and an official patch is available for Squid 3.5 and Squid 4.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Squid is a proxy server that many users share. A small helper program it runs to check login details did not check the size of the input properly, so a crafted login could overwrite memory it should not touch. The operating system then kills that helper, and because Squid depends on it, the whole proxy stops working for everyone.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.