Bug 1169659 - (CVE-2019-12519) VUL-0: CVE-2019-12519,CVE-2019-12521: squid: stack buffer overflow when handling the tag esi:when
(CVE-2019-12519)
VUL-0: CVE-2019-12519,CVE-2019-12521: squid: stack buffer overflow when handl...
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Normal
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/257586/
CVSSv3.1:SUSE:CVE-2019-12519:7.6:(AV...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-16 12:35 UTC by Alexandros Toptsoglou
Modified: 2022-04-14 15:40 UTC (History)
2 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandros Toptsoglou 2020-04-16 12:35:03 UTC
CVE-2019-12519

An issue was discovered in Squid through 4.7. When handling the tag esi:when
when ESI is enabled, Squid calls ESIExpression::Evaluate. This function uses a
fixed stack buffer to hold the expression while it's being evaluated. When
processing the expression, it could either evaluate the top of the stack, or add
a new member to the stack. When adding a new member, there is no check to ensure
that the stack won't overflow.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-12519
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12519
https://gitlab.com/jeriko.one/security/-/blob/master/squid/CVEs/CVE-2019-12519.txt
Comment 1 Alexandros Toptsoglou 2020-04-23 09:56:14 UTC

__________________________________________________________________

    Squid Proxy Cache Security Update Advisory SQUID-2019:12
__________________________________________________________________

Advisory ID:        SQUID-2019:12
Date:               April 23, 2020
Summary:            Multiple issues
                    in ESI Response processing.
Affected versions:  Squid 3.x -> 3.5.28
                    Squid 4.x -> 4.10
                    Squid 5.x -> 5.0.1
Fixed in version:   Squid 4.11 and 5.0.2
__________________________________________________________________

    http://www.squid-cache.org/Advisories/SQUID-2019_12.txt
    http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12519
    http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12521
__________________________________________________________________

Problem Description:

 Due to incorrect buffer handling Squid is vulnerable to cache
 poisoning, remote execution, and denial of service attacks when
 processing ESI responses.

__________________________________________________________________

Severity:

 These problems allow a remote server delivering certain ESI
 response syntax to trigger a buffer overflow.

 On systems with heap overflow protection overflow will shutdown
 the proxy causing a denial of service for all clients accessing
 the Squid service.

 On systems with ESI buffer pooling (the default) overflow will
 truncate portions of generated payloads. Poisoning the HTTP
 response cache with corrupted objects.

 The CVE-2019-12519 issue also overwrites arbitrary attacker
 controlled information onto the process stack. Allowing remote
 code execution with certain crafted ESI payloads.

 These problems are restricted to ESI responses received from an
 upstream server. Attackers have to compromise the server or
 transmission channel to utilize these vulnerabilities.

__________________________________________________________________

Updated Packages:

 This bug is fixed by Squid versions 4.11 and 5.0.2.

 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/changesets/squid-4-fdd4123629320aa1ee4c3481bb392437c90d188d.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:

 All Squid-2.x are not vulnerable.

 All Squid built with --disable-esi are not vulnerable.

 All Squid-3.0 versions built without --enable-esi are not
 vulnerable.

 All Squid-3.x versions built with --enable-esi are vulnerable.

 All Squid-4.x up to and including Squid-4.10 are vulnerable.

 Squid-5.0.1 is not vulnerable to the CVE-2019-12519 remote code
 execution issue.

 Squid-5.0.1 is vulnerable to the CVE-2019-12521 issues.

__________________________________________________________________

Workaround:

 Build Squid with --disable-esi

__________________________________________________________________

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 your install and build Squid from the original Squid sources
 then the squid-users@lists.squid-cache.org 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
 squid-bugs@lists.squid-cache.org 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 Jeriko One
 <jeriko.one@gmx.us>.

 Fixed by Amos Jeffries of Treehouse Networks Ltd.

__________________________________________________________________

Revision history:

 2019-05-14 14:56:49 UTC Initial Report
 2019-05-20 11:23:13 UTC Patches Released
 2019-06-05 15:52:17 UTC CVE Assignment
 2020-04-23 08:00:00 UTC Advisory Released
__________________________________________________________________
END
Comment 2 Alexandros Toptsoglou 2020-04-23 09:56:45 UTC
Tracked as affected SLE12, SLE12-SP2, SLE12-SP5 and SLE15
Comment 3 Swamp Workflow Management 2020-04-23 14:30:13 UTC
This is an autogenerated message for OBS integration:
This bug (1169659) was mentioned in
https://build.opensuse.org/request/show/796564 Factory / squid
Comment 6 Swamp Workflow Management 2020-04-29 10:14:22 UTC
SUSE-SU-2020:1134-1: An update that fixes 6 vulnerabilities is now available.

Category: security (important)
Bug References: 1162689,1162691,1167373,1169659,1170313
CVE References: CVE-2019-12519,CVE-2019-12521,CVE-2019-12528,CVE-2019-18860,CVE-2020-11945,CVE-2020-8517
Sources used:
SUSE Linux Enterprise Server 12-SP5 (src):    squid-4.11-4.9.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 7 Swamp Workflow Management 2020-04-30 13:17:40 UTC
SUSE-SU-2020:1156-1: An update that fixes 6 vulnerabilities is now available.

Category: security (important)
Bug References: 1162689,1162691,1167373,1169659,1170313
CVE References: CVE-2019-12519,CVE-2019-12521,CVE-2019-12528,CVE-2019-18860,CVE-2020-11945,CVE-2020-8517
Sources used:
SUSE Linux Enterprise Server for SAP 15 (src):    squid-4.11-5.17.2
SUSE Linux Enterprise Server 15-LTSS (src):    squid-4.11-5.17.2
SUSE Linux Enterprise Module for Server Applications 15-SP2 (src):    squid-4.11-5.17.2
SUSE Linux Enterprise Module for Server Applications 15-SP1 (src):    squid-4.11-5.17.2
SUSE Linux Enterprise High Performance Computing 15-LTSS (src):    squid-4.11-5.17.2
SUSE Linux Enterprise High Performance Computing 15-ESPOS (src):    squid-4.11-5.17.2

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 9 Swamp Workflow Management 2020-05-11 09:11:24 UTC
openSUSE-SU-2020:0623-1: An update that fixes 6 vulnerabilities is now available.

Category: security (important)
Bug References: 1162689,1162691,1167373,1169659,1170313
CVE References: CVE-2019-12519,CVE-2019-12521,CVE-2019-12528,CVE-2019-18860,CVE-2020-11945,CVE-2020-8517
Sources used:
openSUSE Leap 15.1 (src):    squid-4.11-lp151.2.15.2
Comment 10 Swamp Workflow Management 2020-05-11 09:29:08 UTC
SUSE-SU-2020:1227-1: An update that fixes 5 vulnerabilities is now available.

Category: security (important)
Bug References: 1169659,1170313,1170423
CVE References: CVE-2019-12519,CVE-2019-12520,CVE-2019-12521,CVE-2019-12524,CVE-2020-11945
Sources used:
SUSE OpenStack Cloud Crowbar 8 (src):    squid-3.5.21-26.23.1
SUSE OpenStack Cloud 8 (src):    squid-3.5.21-26.23.1
SUSE OpenStack Cloud 7 (src):    squid-3.5.21-26.23.1
SUSE Linux Enterprise Server for SAP 12-SP3 (src):    squid-3.5.21-26.23.1
SUSE Linux Enterprise Server for SAP 12-SP2 (src):    squid-3.5.21-26.23.1
SUSE Linux Enterprise Server 12-SP4 (src):    squid-3.5.21-26.23.1
SUSE Linux Enterprise Server 12-SP3-LTSS (src):    squid-3.5.21-26.23.1
SUSE Linux Enterprise Server 12-SP3-BCL (src):    squid-3.5.21-26.23.1
SUSE Linux Enterprise Server 12-SP2-LTSS (src):    squid-3.5.21-26.23.1
SUSE Linux Enterprise Server 12-SP2-BCL (src):    squid-3.5.21-26.23.1
SUSE Enterprise Storage 5 (src):    squid-3.5.21-26.23.1
HPE Helion Openstack 8 (src):    squid-3.5.21-26.23.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 12 Swamp Workflow Management 2020-08-24 16:14:45 UTC
SUSE-SU-2020:14460-1: An update that fixes 21 vulnerabilities is now available.

Category: security (important)
Bug References: 1140738,1141329,1141332,1156323,1156324,1156326,1156328,1156329,1162687,1162689,1162691,1167373,1169659,1170313,1170423,1173304,1173455
CVE References: CVE-2019-12519,CVE-2019-12520,CVE-2019-12521,CVE-2019-12523,CVE-2019-12524,CVE-2019-12525,CVE-2019-12526,CVE-2019-12528,CVE-2019-12529,CVE-2019-13345,CVE-2019-18676,CVE-2019-18677,CVE-2019-18678,CVE-2019-18679,CVE-2019-18860,CVE-2020-11945,CVE-2020-14059,CVE-2020-15049,CVE-2020-8449,CVE-2020-8450,CVE-2020-8517
JIRA References: 
Sources used:
SUSE Linux Enterprise Server 11-SP4-LTSS (src):    squid3-3.1.23-8.16.37.12.1
SUSE Linux Enterprise Point of Sale 11-SP3 (src):    squid3-3.1.23-8.16.37.12.1
SUSE Linux Enterprise Debuginfo 11-SP4 (src):    squid3-3.1.23-8.16.37.12.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 13 Gabriele Sonnu 2022-04-14 15:40:43 UTC
Done.