Bug 1052440 - CVE-2014-0022 yum: yum-cron installs unsigned packages [fedora-all]
Summary: CVE-2014-0022 yum: yum-cron installs unsigned packages [fedora-all]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 19
Hardware: noarch
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: CVE-2014-0022
TreeView+ depends on / blocked
 
Reported: 2014-01-13 20:15 UTC by GV
Modified: 2014-02-06 03:53 UTC (History)
9 users (show)

Fixed In Version: yum-3.4.3-132.fc19
Doc Type: Release Note
Doc Text:
Clone Of:
: 1052994 1053202 (view as bug list)
Environment:
Last Closed: 2014-01-18 04:27:09 UTC


Attachments (Terms of Use)

Description GV 2014-01-13 20:15:42 UTC
Description of problem:
yum-cron install unsigned packages. This is not acceptable!

Version-Release number of selected component (if applicable):
yum-cron-3.4.3-128.fc19.noarch

Steps to Reproduce:
$ rpmbuild -ba testrpm.spec 
...
Wrote: /home/someuser/work/rpm/SRPMS/testrpm-1.0-1.f19g.src.rpm
Wrote: /home/someuser/work/rpm/RPMS/noarch/testrpm-1.0-1.f19g.noarch.rpm
...
+ exit 0

$ rpmsign --addsign /home/someuser/work/rpm/RPMS/noarch/testrpm-1.0-1.f19g.noarch.rpm
Enter pass phrase: 
Pass phrase is good.
/home/someuser/work/rpm/RPMS/noarch/testrpm-1.0-1.f19g.noarch.rpm:

$ yum -y install /home/someuser/work/rpm/RPMS/noarch/testrpm-1.0-1.f19g.noarch.rpm
...
$ rpm -q testrpm
testrpm-1.0-1.f19g.noarch

$ rpmbuild -ba testrpm.spec 
...
Wrote: /home/someuser/work/rpm/SRPMS/testrpm-1.1-1.f19g.src.rpm
Wrote: /home/someuser/work/rpm/RPMS/noarch/testrpm-1.1-1.f19g.noarch.rpm
...
+ exit 0

$ mkdir ~/testrepo
$ cd ~testrepo
$ cp /home/someuser/work/rpm/RPMS/noarch/testrpm-1.1-1.f19g.noarch.rpm .
$ createrepo .
...

$ grep gpgcheck=0 /etc/yum.conf /etc/yum.repos.d/*
$ cat 
[test]
name=test
baseurl=file:///home/someuser/testrepo
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-test
gpgcheck=1
enabled=1

Wait for yum-cron to run via crontab. The email received from cron daemon look like this:

From: Cron Daemon <root@xxxx>
To: root@xxxx
Subject: Cron <root@xxxx> run-parts /etc/cron.hourly

/etc/cron.hourly/0yum-hourly.cron:

Loaded plugins: fastestmirror, post-transaction-actions, priorities,
              : protectbase, remove-with-leaves, rpm-warm-cache, versionlock
Loading mirror speeds from cached hostfile
...
0 packages excluded due to repository protections
Package testrpm-1.1-1.f19g.noarch.rpm is not signed

$ rpm -q testrpm
testrpm-1.1-1.f19g.noarch

$ rpm -ev testrpm
Preparing packages...
testrpm-1.1-1.f19g.noarch

[root@imhotep ~]# yum -y install testrpm
...
--> Running transaction check
---> Package testrpm.noarch 0:1.1-1.f19g will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package            Arch              Version               Repository     Size
================================================================================
Installing:
 testrpm            noarch            1.1-1.f19g            test          1.9 k

Transaction Summary
================================================================================
Install  1 Package

Total size: 1.9 k
Installed size: 0  
Downloading packages:


Package testrpm-1.1-1.f19g.noarch.rpm is not signed


Actual results:
yum-cron install unsigned packages.

Expected results:
yum-cron should not install unsigned packages.

Additional info:

Comment 1 Zdeněk Pavlas 2014-01-14 14:44:52 UTC
Confirmed, thanks for the report. Looks like an easy fix.

http://yum.baseurl.org/gitweb?p=yum.git;a=commitdiff;h=9df69e579496ccb6df5c3f5b5b7bab8d648b06b4

Comment 2 GV 2014-01-14 19:42:41 UTC
> Confirmed, thanks for the report. Looks like an easy fix.
> 
> http://yum.baseurl.org/gitweb?p=yum.git;a=commitdiff;
> h=9df69e579496ccb6df5c3f5b5b7bab8d648b06b4
Thank you. Your patch works for me.

Comment 3 Fedora Update System 2014-01-15 11:06:22 UTC
yum-3.4.3-130.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/yum-3.4.3-130.fc20

Comment 4 Fedora Update System 2014-01-15 16:09:52 UTC
yum-3.4.3-130.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/yum-3.4.3-130.fc19

Comment 5 Fedora Update System 2014-01-16 07:07:14 UTC
Package yum-3.4.3-130.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing yum-3.4.3-130.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0928/yum-3.4.3-130.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-01-18 04:27:09 UTC
yum-3.4.3-130.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2014-01-22 11:09:16 UTC
yum-3.4.3-132.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/yum-3.4.3-132.fc19

Comment 8 Fedora Update System 2014-02-06 03:53:15 UTC
yum-3.4.3-132.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.