|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:|
|Version:||unspecified||CC:||carnil, ffesti, fweimer, jkurik, jrusnack, ksrot, pfrields, pmatilai, security-response-team, thomas.jarosch, vdanen|
|Fixed In Version:||Doc Type:||Bug Fix|
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.
|Last Closed:||2014-12-19 04:48:19 UTC||Type:||---|
|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|
Description Murray McAllister 2013-12-10 04:12:37 UTC
Comment 17 Florian Weimer 2014-11-11 10:17:21 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.
Comment 24 Florian Weimer 2014-11-11 12:23:40 UTC
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.
Comment 25 Panu Matilainen 2014-11-11 12:46:09 UTC
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.
Comment 29 Huzaifa S. Sidhpurwala 2014-12-09 12:50:40 UTC
Created rpm tracking bugs for this issue: Affects: fedora-all [bug 1172125]
Comment 30 errata-xmlrpc 2014-12-09 18:08:00 UTC
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
Comment 31 errata-xmlrpc 2014-12-09 18:08:17 UTC
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
Comment 32 errata-xmlrpc 2014-12-09 19:50:55 UTC
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
Comment 33 Fedora Update System 2014-12-17 04:46:12 UTC
rpm-22.214.171.124-4.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
Comment 34 Fedora Update System 2014-12-29 09:57:21 UTC
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.
Comment 35 Thomas Jarosch 2015-01-22 11:37:40 UTC
Is it intentional that the fix for fc22 as in "rpm-126.96.36.199-6.fc22.src.rpm" does not contain the line + rpm_loff_t left = rpmfiFSizeIndex(fsmGetFi(fsm), fsm->ix); from Florian's patch?
Comment 36 Karel Srot 2015-03-18 07:55:53 UTC
Hi Florian, could you please take a look at #c35?
Comment 37 Panu Matilainen 2015-03-18 08:18:18 UTC
It is intentional, rpm 4.12 code already does that for other reasons.