Summary: | CVE-2013-6435 rpm: race condition during the installation process | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Other] Security Response | Reporter: | Murray McAllister <mmcallis> | ||||||
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> | ||||||
Status: | CLOSED ERRATA | QA Contact: | |||||||
Severity: | high | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | unspecified | CC: | carnil, ffesti, fweimer, jkurik, jrusnack, ksrot, pfrields, pmatilai, security-response-team, thomas.jarosch, vdanen | ||||||
Target Milestone: | --- | Keywords: | Security | ||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: |
It was found that RPM wrote file contents to the target installation directory under a temporary name, and verified its cryptographic signature only after the temporary file has been written completely. Under certain conditions, the system interprets the unverified temporary file contents and extracts commands from it. This could allow an attacker to modify signed RPM files in such a way that they would execute code chosen by the attacker during package installation.
|
Story Points: | --- | ||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2014-12-19 04:48:19 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Bug Depends On: | 1163052, 1163053, 1163054, 1163055, 1163056, 1163057, 1163058, 1163059, 1163060, 1163061, 1172125 | ||||||||
Bug Blocks: | 1039813 | ||||||||
Attachments: |
|
Description
Murray McAllister
2013-12-10 04:12:37 UTC
Created attachment 956207 [details] rpm-4.8.0-CVE-2013-6435.patch (version without umask) Proposed patch for RPM 4.8. This is based on Panu's suggestion in comment #8, but creates the file with mode 0 instead, instead of using chmod afterwards, closing yet another race. Created attachment 956268 [details]
rpm-4.8.0-CVE-2013-6435.patch (version with umask)
This variant of the patch is smaller than the previous one. The RPM transaction code is not thread-safe already, so another umask call should not be a problem.
Yeah, that is short and sweet, and trivial to backport. Except that there is no rpmfiFSizeIndex() in < 4.8.x versions, but should be easy enough to replace with direct struct access. Created rpm tracking bugs for this issue: Affects: fedora-all [bug 1172125] This issue has been addressed in the following products: Red Hat Enterprise Linux 6.5 EUS - Server and Compute Node Only Red Hat Enterprise Linux 6.4 EUS - Server and Compute Node Only Red Hat Enterprise Linux 5.6 Long Life Red Hat Enterprise Linux 5.9 EUS - Server Only Red Hat Enterprise Linux 6.2 AUS Via RHSA-2014:1975 https://rhn.redhat.com/errata/RHSA-2014-1975.html This issue has been addressed in the following products: Red Hat Enterprise Linux 6 Red Hat Enterprise Linux 5 Via RHSA-2014:1974 https://rhn.redhat.com/errata/RHSA-2014-1974.html This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2014:1976 https://rhn.redhat.com/errata/RHSA-2014-1976.html rpm-4.12.0.1-4.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. rpm-4.11.3-2.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. Is it intentional that the fix for fc22 as in "rpm-4.12.0.1-6.fc22.src.rpm" does not contain the line + rpm_loff_t left = rpmfiFSizeIndex(fsmGetFi(fsm), fsm->ix); from Florian's patch? Hi Florian, could you please take a look at #c35? It is intentional, rpm 4.12 code already does that for other reasons. |