Bug 734583 (CVE-2011-3205)
Summary: | CVE-2011-3205 squid: buffer overflow flaw in Squid's Gopher reply parser (SQUID-2011:3) | ||
---|---|---|---|
Product: | [Other] Security Response | Reporter: | Vincent Danen <vdanen> |
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
Status: | CLOSED ERRATA | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | unspecified | CC: | henrik, jonathansteffan, jskala, prc |
Target Milestone: | --- | Keywords: | Security |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-09-14 20:09:38 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: | 734584, 735447, 735448, 844300 | ||
Bug Blocks: | 734589 |
Description
Vincent Danen
2011-08-30 19:53:16 UTC
Created squid tracking bugs for this issue Affects: fedora-all [bug 734584] This was assigned the name CVE-2011-3205. Henrik, is there a reason why your upstream patch duplicates this code? + if (!lpos) { + /* there is no complete line in inbuf */ + /* copy it to temp buffer */ + /* note: llen is adjusted above */ + memcpy(gopherState->buf + gopherState->len, pos, llen); + gopherState->len += llen; + break; + } + if (!lpos) { + /* there is no complete line in inbuf */ + /* copy it to temp buffer */ + /* note: llen is adjusted above */ + memcpy(gopherState->buf + gopherState->len, pos, llen); + gopherState->len += llen; + break; + } It looks harmless, only redundant (albeit probably optimized-out by clever compiler). As you're also quite familiar with the issue, can you confirm that the 2.x vs. 3.x difference is due to read_sz value change in gopherReadReply? Or is that not the reason for the previous fix being incomplete in 3.x? The duplicated code is a harmless copy-paste error when the change was forward ported from Suqid-2. Now killed. Thanks for noticing! The original patch is http://www.squid-cache.org/Versions/v2/2.HEAD/changesets/12710.patch and is on it's way to Squid-2.7 shortly as a normal maintenance/bugfix patch. And yes, the security issue opened up in Squid-3 due to the change in read buffer size. Both versions failed to parse gopher responses when a line is split over more than one large packet. But only Squid-3 had an buffer overflow. Fixing the line parser fixes both. Thank you for clarifying / confirming! I've managed to reproduce the overflow, even though it does not trigger crash on RHEL-6 x86. Apparently adjacent BSS memory does not get used by anything important in my test. This issue has been addressed in following products: Red Hat Enterprise Linux 6 Via RHSA-2011:1293 https://rhn.redhat.com/errata/RHSA-2011-1293.html |