Out-of-bounds write in Squid - CVE-2019-12521
Published: May 11, 2020
Vulnerability details
The vulnerability allows a remote attacker to perform a denial of service (DoS) attack.
The vulnerability exists due to a boundary error when processing untrusted input. When Squid is parsing ESI, it keeps the ESI elements in ESIContext. ESIContext contains a buffer for holding a stack of ESIElements. When a new ESIElement is parsed, it is added via addStackElement. addStackElement has a check for the number of elements in this buffer, but it's off by 1, leading to a Heap Overflow of 1 element. The overflow is within the same structure so it can't affect adjacent memory blocks, and thus just leads to a crash while processing.
Affected software
Gentoo Linux
Amazon Linux AMI
Anolis OS
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for ARM 64
Opensuse
openEuler
squid (Alpine package)
squid (Debian package)
squid3 (Ubuntu package)
squid (Ubuntu package)
libecap
libecap-devel
squid
squid-debuginfo
squid-debugsource
How to mitigate CVE-2019-12521
squid (Debian package) - update to 4.6-1+deb10u2
squid3 (Ubuntu package) - addressed in versions 3.5.12-1ubuntu7.11, 3.5.27-1ubuntu1.6
squid (Ubuntu package) - addressed in versions 4.8-1ubuntu2.3, 4.10-1ubuntu1.1
libecap - update to 1.0.1-2
libecap-devel - update to 1.0.1-2
squid - update to 4.9-11
squid-debuginfo - update to 4.9-11
squid-debugsource - update to 4.9-11
squid - update to 4.11-4
External References
Related Security Bulletins
- Multiple vulnerabilities in Squid Proxy Cache
- Debian update for squid
- OpenSUSE Linux update for squid
- Gentoo update for Squid
- Ubuntu update for Squid
- Amazon Linux AMI update for squid
- Red Hat Enterprise Linux 8 update for the squid:4 module
- Out-of-bounds write in squid (Alpine package)
- openEuler 20.03 LTS SP1 update for squid
- Anolis OS update for squid:4 (Anolis OS 8.4) module