Bug 1209632 (CVE-2015-1822)

Summary: CVE-2015-1822 chrony: uninitialized pointer in cmdmon reply slots
Product: [Other] Security Response Reporter: Kurt Seifried <kseifried>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: jrusnack, mlichvar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
An uninitialized pointer use flaw was found when allocating memory to save unacknowledged replies to authenticated command requests. An attacker that has the command key and is allowed to access cmdmon (only localhost is allowed by default) could use this flaw to crash chronyd or, possibly, execute arbitrary code with the privileges of the chronyd process.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-20 05:27:34 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: 1209633, 1209634, 1221579    
Bug Blocks: 1200382, 1210268    

Description Kurt Seifried 2015-04-07 20:45:57 UTC
Miroslav Lichvar of Red Hat reports:

The last pointer in the list of allocated reply slots that are used to
save authenticated cmdmon replies is not initialized.

This one was actually found couple months ago and it's already fixed
in git, but only recently I realized it could have security
implications.

An authenticated attacker can allocate and deallocate memory with
other commands (e.g. allow/deny) and can force allocation of new reply
slots by making new requests and not acknowledging previous replies,
and then let chronyd write a reply to an invalid memory.

Comment 1 Kurt Seifried 2015-04-07 20:47:24 UTC
Acknowledgements:

This issue was discovered by Miroslav Lichvár of Red Hat.

Comment 2 Kurt Seifried 2015-04-07 20:49:26 UTC
Created chrony tracking bugs for this issue:

Affects: epel-all [bug 1209633]

Comment 3 Kurt Seifried 2015-04-07 20:51:43 UTC
Created chrony tracking bugs for this issue:

Affects: fedora-all [bug 1209634]

Comment 4 Kurt Seifried 2015-04-08 15:59:21 UTC
This issue was fixed upstream:

http://chrony.tuxfamily.org/News.html

The updated version is available at: 

http://download.tuxfamily.org/chrony/chrony-1.31.1.tar.gz

Comment 5 Fedora Update System 2015-04-22 22:43:04 UTC
chrony-2.0-0.3.pre2.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2015-04-22 22:53:49 UTC
chrony-1.31.1-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2015-04-23 19:00:46 UTC
chrony-1.31.1-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2015-04-23 19:02:42 UTC
chrony-1.31.1-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2015-04-24 22:50:03 UTC
chrony-1.31.1-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 errata-xmlrpc 2015-11-19 08:30:05 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2015:2241 https://rhn.redhat.com/errata/RHSA-2015-2241.html