CVE-2019-12521

NameCVE-2019-12521
DescriptionAn issue was discovered in Squid through 4.7. 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-2278-1, DSA-4682-1, ELA-271-1

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
squid (PTS)buster (security), buster, buster (lts)4.6-1+deb10u10fixed
bullseye (security), bullseye4.13-10+deb11u3fixed
bookworm (security), bookworm5.7-2+deb12u2fixed
sid, trixie6.12-1fixed
squid3 (PTS)jessie, jessie (lts)3.5.23-5+deb8u7fixed
stretch (security)3.5.23-5+deb9u7fixed
stretch (lts), stretch3.5.23-5+deb9u10fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
squidsourcewheezy(unfixed)end-of-life
squidsourcebuster4.6-1+deb10u2DSA-4682-1
squidsource(unstable)4.11-1
squid3sourcewheezy(unfixed)end-of-life
squid3sourcejessie3.5.23-5+deb8u1ELA-271-1
squid3sourcestretch3.5.23-5+deb9u2DLA-2278-1
squid3source(unstable)(unfixed)

Notes

http://www.squid-cache.org/Advisories/SQUID-2019_12.txt
Squid 4: http://www.squid-cache.org/Versions/v4/changesets/squid-4-fdd4123629320aa1ee4c3481bb392437c90d188d.patch

Search for package or bug name: Reporting problems