Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1375490 (CVE-2016-6299) - CVE-2016-6299 mock: privilige escalation via mock-scm
Summary: CVE-2016-6299 mock: privilige escalation via mock-scm
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: CVE-2016-6299
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1375493 1375496
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-13 09:15 UTC by Martin Prpič
Modified: 2021-02-17 03:21 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-03 06:30:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Martin Prpič 2016-09-13 09:15:12 UTC
It was found that mock's scm plug-in would parse a given spec file with root priviliges. This could allow an attacker who is able to start a build of an rpm with a specially crafted spec file within mock's environment to elevate their priviliges and escape the chroot.

The vulnerable code in scm.py is:

    ts = rpm.ts()
    rpm_spec = ts.parseSpec(self.spec)  # the spec file is parsed as root
    self.name = rpm.expandMacro("%{name}")

Comment 1 Martin Prpič 2016-09-13 09:15:24 UTC
Acknowledgments:

Name: Florian Weimer (Red Hat)

Comment 2 Martin Prpič 2016-09-13 09:15:58 UTC
Created mock tracking bugs for this issue:

Affects: fedora-all [bug 1375493]
Affects: epel-all [bug 1375496]

Comment 3 Fedora Update System 2016-09-16 23:20:52 UTC
distribution-gpg-keys-1.7-1.fc24, mock-1.2.21-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2016-09-20 17:07:32 UTC
distribution-gpg-keys-1.7-1.fc25, mock-1.2.21-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Miroslav Suchý 2016-10-03 06:30:28 UTC
Closing because all referenced bugs have been closed.


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