Bug 1730535 (CVE-2019-12525)

Summary: CVE-2019-12525 squid: parsing of header Proxy-Authentication leads to memory corruption
Product: [Other] Security Response Reporter: Dhananjay Arunesh <darunesh>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: anon.amish, bnater, cbuissar, code, jonathansteffan, kyoshida, luhliari, mschena, qguo, uwe.knop, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: squid 4.8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-06 16:31:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1730536, 1738582, 1738583, 1829402, 1829772    
Bug Blocks: 1730537    

Description Dhananjay Arunesh 2019-07-17 04:44:17 UTC
An issue was discovered in Squid 3.3.9 through 3.5.28 and 4.x through 4.7. When
Squid is configured to use Digest authentication, it parses the header
Proxy-Authorization. It searches for certain tokens such as domain, uri, and
qop. Squid checks if this token's value starts with a quote and ends with one.
If so, it performs a memcpy of its length minus 2. Squid never checks whether
the value is just a single quote (which would satisfy its requirements), leading
to a memcpy of its length minus 1.

Reference:
http://www.squid-cache.org/Versions/v4/changesets/
https://github.com/squid-cache/squid/commits/v4

Upstream patches:
squid-4 : http://www.squid-cache.org/Versions/v4/changesets/squid-4-409956536647b3a05ee1e367424a24ae6b8f13fd.patch
squid-3.5 : http://www.squid-cache.org/Versions/v3/3.5/changesets/squid-3.5-ec0d0f39cf28da14eead0ba5e777e95855bc2f67.patch

Comment 1 Dhananjay Arunesh 2019-07-17 04:44:37 UTC
Created squid tracking bugs for this issue:

Affects: fedora-all [bug 1730536]

Comment 2 Cedric Buissart 2019-08-07 10:04:37 UTC
External References:

http://www.squid-cache.org/Advisories/SQUID-2019_3.txt

Comment 4 Cedric Buissart 2019-08-07 13:53:41 UTC
Mitigation:

Remove 'auth_param digest ...' configuration settings from squid.conf.

Comment 13 errata-xmlrpc 2020-05-06 13:48:07 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:2041 https://access.redhat.com/errata/RHSA-2020:2041

Comment 14 errata-xmlrpc 2020-05-06 13:48:30 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2020:2040 https://access.redhat.com/errata/RHSA-2020:2040

Comment 15 Product Security DevOps Team 2020-05-06 16:31:50 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2019-12525