Bug 1062326 (CVE-2014-1891, CVE-2014-1892, CVE-2014-1893, CVE-2014-1894)

Summary: CVE-2014-1891 CVE-2014-1892 CVE-2014-1893 CVE-2014-1894 xen: integer overflow in several XSM/Flask hypercalls (xsa-84)
Product: [Other] Security Response Reporter: Petr Matousek <pmatouse>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: agordeev, anton, dhoward, drjones, imammedo, jforbes, jkurik, kraxel, lwang, m.a.young, mrezanin, pbonzini, pholasek, plougher, rkrcmar, rvrbovsk, virt-maint, xen-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-06 16:41:24 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: 1062335    
Bug Blocks: 1062332    

Description Petr Matousek 2014-02-06 16:39:17 UTC
The FLASK_{GET,SET}BOOL, FLASK_USER and FLASK_CONTEXT_TO_SID suboperations of the flask hypercall are vulnerable to an integer overflow on the input size. The hypercalls attempt to allocate a buffer which is 1 larger than this size and is therefore vulnerable to integer overflow and an attempt to allocate then access a zero byte buffer.

Attempting to access the result of a zero byte allocation results in a processor fault leading to a denial of service.

Acknowledgements:

Red Hat would like to thank the Xen project for reporting this issue.

Comment 1 Petr Matousek 2014-02-06 16:40:56 UTC
Statement:

Not vulnerable.

This issue did not affect the versions of the kernel-xen package as shipped with Red Hat Enterprise Linux 5.

This issue did not affect Red Hat Enterprise Linux 6 and Red Hat Enterprise MRG 2 as we did not have support for Xen hypervisor.

Comment 2 Petr Matousek 2014-02-06 16:41:24 UTC
External reference:

http://seclists.org/oss-sec/2014/q1/266

Comment 3 Petr Matousek 2014-02-06 16:58:58 UTC
Created xen tracking bugs for this issue:

Affects: fedora-all [bug 1062335]

Comment 4 Murray McAllister 2014-02-10 00:56:22 UTC
From http://seclists.org/oss-sec/2014/q1/266:

The FLASK_{GET,SET}BOOL, FLASK_USER and FLASK_CONTEXT_TO_SID
suboperations of the flask hypercall are vulnerable to an integer
overflow on the input size. The hypercalls attempt to allocate a
buffer which is 1 larger than this size and is therefore vulnerable to
integer overflow and an attempt to allocate then access a zero byte
buffer.

The above was assigned CVE-2014-1891

Xen 3.3 through 4.1, while not affected by the above overflow, have a
different overflow issue on FLASK_{GET,SET}BOOL and expose unreasonably
large memory allocation to aribitrary guests.

The unreasonably large memory allocation part of the above was assigned CVE-2014-1892.

The different overflow issue on FLASK_{GET,SET}BOOL part of the above was assigned CVE-2014-1893.

Xen 3.2 (and presumably earlier) exhibit both problems, with the
overflow issue being present for more than just the suboperations
listed above.

Quoting http://seclists.org/oss-sec/2014/q1/283:

"the part of the 3.2 problems associated with the first overflow, for
FLASK_{GET,SET}BOOL, FLASK_USER and FLASK_CONTEXT_TO_SID, is within
the scope of CVE-2014-1891

the part of the 3.2 problems associated with unreasonably large memory
allocation is within the scope of CVE-2014-1892

the part of the 3.2 problems associated with the second overflow, for
FLASK_{GET,SET}BOOL, is within the scope of CVE-2014-1893

all other vectors (e.g., other suboperations) that can lead to integer
overflows in 3.2, even if they are related to the first overflow or
related to the second overflow, have CVE-2014-1894 assigned now"

References: http://seclists.org/oss-sec/2014/q1/283