Bug 591580 (CVE-2010-2251)
Summary: | CVE-2010-2251 lftp: multiple HTTP client download filename vulnerability [OCERT 2010-001] | ||||||||
---|---|---|---|---|---|---|---|---|---|
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: | jlieskov, ovasik, psplicha, security-response-team, skakar | ||||||
Target Milestone: | --- | Keywords: | Security | ||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
URL: | http://www.ocert.org/advisories/ocert-2010-001.html | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | CVE-2010-2252 CVE-2010-2253 (view as bug list) | Environment: | |||||||
Last Closed: | 2015-07-29 14:15:48 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: | 602836, 602838, 617870, 617871 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Vincent Danen
2010-05-12 15:37:57 UTC
No patches from upstream are available on any of these, however lftp 4.0.6 does correct the issue, so we should be able to generate a patch based on a diff between 4.0.5 and 4.0.6. The NEWS file indicates: * use O_EXCL flag when xfer:clobber is off. * better validation of server-provided file name. * new setting xfer:auto-rename (off by default). All three issues are relevant, but the last is the big one. To test, try: lftpget http://wordpress.org/latest.tar.gz A vulnerable lftp will produce wordpress-2.9.2.tar.gz silently, whereas a fixed lftp will generate latest.tar.gz unless the user explicitly sets xfer:auto-rename. This WordPress example is only useful when testing the Content-Disposition HTTP header, not Location. libwww-perl 5.835 is also supposed to fix this issue, so a diff between 5.834 and 5.835 should produce a relevant patch. This is now public: http://www.ocert.org/advisories/ocert-2010-001.html Florian made a post to oss-security with a preliminary patch for wget. It probably requires some upstream review as it does add a new configuration option: http://article.gmane.org/gmane.comp.security.oss.general/2908 However, Ludwig Nussel indicates that wget's behaviour is acceptable and probably doesn't require fixing at all, as wget does not overwrite existing files by default (adds suffixes like .1 and .2 to the new file if it already exists), and also prints the file name it used so there are no surprises. In light of that, I would consider this a non-issue for wget, especially considering how intrusive the patch is for a backport. MITRE has assigned the following CVE names for the three packages noted in this advisory, and as a result this bug has been cloned to distinguish between the three: CVE-2010-2251: lftp CVE-2010-2252: wget (see bug #602797) CVE-2010-2253: perl-libwww-perl (see bug #602800) Created attachment 423030 [details]
patch to correct the issue
This patch is the relevant differences between 4.0.5 and 4.0.6, and also includes the following change from 4.0.7:
* GetJob.cc: make xfer:clobber=no by default.
Created lftp tracking bugs for this issue Affects: fedora-all [bug 602836] lftp-4.0.8-1.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/lftp-4.0.8-1.fc12 lftp-4.0.8-1.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report. Statement: This issue did not affect the version of lftp as shipped with Red Hat Enterprise Linux 3 and 4 as they did not include support for renaming files to a server-suggested file name. Created attachment 435311 [details]
Corrected patch with manpage changes
I added manpage corrections into the patch and changed it to respect xfer:clobber ... Old version of the patch had regression that it failed to rename the file if xfer:clobber was activated via conf file. This one works for me in all cases correctly.
As a side note - as lftp doesn't use temporary file, it still deletes the old file if it exists - as it downloads the file with the requested name and then it renames it to the servesuggested name.
This issue has been addressed in following products: Red Hat Enterprise Linux 5 Via RHSA-2010:0585 https://rhn.redhat.com/errata/RHSA-2010-0585.html |