Skip to content

SQUID-2022:2 Buffer Over Read in SSPI and SMB Authentication

High
yadij published GHSA-394c-rr7q-6g78 Sep 23, 2022

Package

squid_ntlm_auth, ntlm_smb_lm_auth, negotiate_sspi_auth, ntlm_sspi_auth, ntlm_fake_auth (Squid)

Affected versions

2.5-5.6

Patched versions

5.7

Description

Due to an incorrect integer overflow protection Squid SSPI and
SMB authentication helpers are vulnerable to a Buffer Overflow
attack.


Severity:

This problem allows a remote client to perform a Denial of
Service attack when Squid is configured to use NTLM or Negotiate
authentication with one of the vulnerable helpers.

This problem allows a remote client to extract sensitive
information from machine memory when Squid is configured to use
NTLM or Negotiate authentication with one of the vulnerable
helpers. The scope of this information includes user credentials
in decrypted forms, and also arbitrary memory areas beyond Squid
and the helper itself.

This attack is limited to authentication helpers built using the
libntlmauth library shipped by Squid.

CVSS Score of 8.2
https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:H/E:P/RL:O/RC:C/CR:H/IR:H/AR:H/MAV:X/MAC:X/MPR:X/MUI:X/MS:C/MC:X/MI:L/MA:H&version=3.1


Updated Packages:

This bug is fixed by Squid version 5.7.

In addition, patches addressing this problem for the stable
releases can be found in our patch archives:

Squid 4:

http://www.squid-cache.org/Versions/v4/SQUID-2022_2.patch

Squid 5:

http://www.squid-cache.org/Versions/v5/SQUID-2022_2.patch

If you are using a prepackaged version of Squid then please refer
to the package vendor for availability information on updated
packages.


Determining if your version is vulnerable:

Run this command to view the configured authentication helpers:

(squid -k parse 2>&1) | grep "Processing: auth_param"

Your Squid may be vulnerable if the result contains any of the following:
ntlm_smb_lm_auth
ntlm_sspi_auth
ntlm_fake_auth
negotiate_sspi_auth

All Squid-2.5 up to and including 4.17 have vulnerable helpers.

All Squid-5.x up to and including 5.6 have vulnerable helpers.


Workaround:

Either,

Disable use of the vulnerable authentication scheme.

Or,

Replace the vulnerable helper with an alternative helper for the
same authentication scheme.

Or,

Replace the vulnerable helper binary with one built from an
updated or patched Squid release. The remainder of Squid does not
need updating to fix this.


Contact details for the Squid project:

For installation / upgrade support on binary packaged versions
of Squid: Your first point of contact should be your binary
package vendor.

If you install and build Squid from the original Squid sources
then the [email protected] mailing list is your
primary support point. For subscription details see
http://www.squid-cache.org/Support/mailing-lists.html.

For reporting of non-security bugs in the latest STABLE release
the squid bugzilla database should be used
http://bugs.squid-cache.org/.

For reporting of security sensitive bugs send an email to the
[email protected] mailing list. It's a closed
list (though anyone can post) and security related bug reports
are treated in confidence until the impact has been established.


Credits:

This vulnerability was discovered by LWIC.

Fixed by Amos Jeffries of Treehouse Networks Ltd,
based on patch by LWIC.


Revision history:

2019-03-17 14:24:42 UTC Initial Report
2022-08-08 12:16:43 UTC Fix Released
2022-09-23 05:00:00 UTC Advisory Released


END

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:H

CVE ID

CVE-2022-41318