Bug 1168707 (CVE-2014-8098)

Summary: CVE-2014-8098 xorg-x11-server: out of bounds access due to not validating length or offset values in GLX extension
Product: [Other] Security Response Reporter: Vasyl Kaigorodov <vkaigoro>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: ajax, chazlett, jrusnack, peter.hutterer, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Multiple out-of-bounds write flaws were found in the way the X.Org server calculated memory requirements for certain GLX extension requests. A malicious, authenticated client could use either of these flaws to crash the X.Org server or, potentially, execute arbitrary code with root privileges.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-11 20:57:35 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: 1170916, 1170917, 1170918, 1170919, 1170932    
Bug Blocks: 1168310    
Attachments:
Description Flags
0023-glx_Fix_image_size_computation_for_EXT_texture_integer_CVE-2014-8098_1-8.patch
none
0025-glx_Length_checking_for_GLXRender_requests_(v2)_CVE-2014-8098_2-8.patch
none
0027-glx_Length_checking_for_RenderLarge_requests_(v2)_CVE-2014-8098_3-8.patch
none
0028-glx_Top-level_length_checking_for_swapped_VendorPrivate_requests_CVE-2014-8098_4-8.patch
none
0029-glx_Request_length_checks_for_SetClientInfoARB_CVE-2014-8098_5-8.patch
none
0030-glx_Length-checking_for_non-generated_vendor_private_requests_CVE-2014-8098_6-8.patch
none
0031-glx_Length_checking_for_non-generated_single_requests_(v2)_CVE-2014-8098_7-8.patch
none
0032-glx_Pass_remaining_request_length_into_->varsize_(v2)_CVE-2014-8098_8-8.patch none

Description Vasyl Kaigorodov 2014-11-27 15:57:30 UTC
Various GLX extension calls do not check that the lengths and/or indexes sent by the
client are within the bounds specified by the caller or the bounds of
the memory allocated to hold the request read from the client, so could
read or write past the bounds of allocated memory while processing the
request. These calls all occur only after a client has successfully
authenticated itself.

Affected functions: __glXDisp_Render(), __glXDisp_RenderLarge(),
__glXDispSwap_VendorPrivate(), __glXDispSwap_VendorPrivateWithReply(),
set_client_info(), __glXDispSwap_SetClientInfoARB(), DoSwapInterval(),
DoGetProgramString(), DoGetString(), __glXDispSwap_RenderMode(),
__glXDisp_GetCompressedTexImage(), __glXDispSwap_GetCompressedTexImage(),
__glXDisp_FeedbackBuffer(), __glXDispSwap_FeedbackBuffer(), 
__glXDisp_SelectBuffer(), __glXDispSwap_SelectBuffer(),
__glXDisp_Flush(), __glXDispSwap_Flush(),
__glXDisp_Finish(), __glXDispSwap_Finish(),
__glXDisp_ReadPixels(), __glXDispSwap_ReadPixels(), 
__glXDisp_GetTexImage(), __glXDispSwap_GetTexImage(),
__glXDisp_GetPolygonStipple(), __glXDispSwap_GetPolygonStipple(),
__glXDisp_GetSeparableFilter(), __glXDisp_GetSeparableFilterEXT(),
__glXDisp_GetConvolutionFilter(), __glXDisp_GetConvolutionFilterEXT(),
__glXDisp_GetHistogram(), __glXDisp_GetHistogramEXT(),
__glXDisp_GetMinmax(), __glXDisp_GetMinmaxEXT(),
__glXDisp_GetColorTable(), __glXDisp_GetColorTableSGI(),
GetSeparableFilter(), GetConvolutionFilter(), GetHistogram(),
GetMinmax(), GetColorTable(),       

Originally developed by SGI and licensed to multiple vendors
prior to SGI open sourcing the code in 1999.
Included in XFree86 releases starting in XFree86 4.0 (2000).
Included in X.Org releases starting in X11R6.7 (2004).

Comment 1 Vasyl Kaigorodov 2014-11-27 15:57:50 UTC
Created attachment 962138 [details]
0023-glx_Fix_image_size_computation_for_EXT_texture_integer_CVE-2014-8098_1-8.patch

Comment 2 Vasyl Kaigorodov 2014-11-27 15:57:53 UTC
Created attachment 962139 [details]
0025-glx_Length_checking_for_GLXRender_requests_(v2)_CVE-2014-8098_2-8.patch

Comment 3 Vasyl Kaigorodov 2014-11-27 15:57:56 UTC
Created attachment 962140 [details]
0027-glx_Length_checking_for_RenderLarge_requests_(v2)_CVE-2014-8098_3-8.patch

Comment 4 Vasyl Kaigorodov 2014-11-27 15:57:58 UTC
Created attachment 962141 [details]
0028-glx_Top-level_length_checking_for_swapped_VendorPrivate_requests_CVE-2014-8098_4-8.patch

Comment 5 Vasyl Kaigorodov 2014-11-27 15:58:01 UTC
Created attachment 962142 [details]
0029-glx_Request_length_checks_for_SetClientInfoARB_CVE-2014-8098_5-8.patch

Comment 6 Vasyl Kaigorodov 2014-11-27 15:58:03 UTC
Created attachment 962143 [details]
0030-glx_Length-checking_for_non-generated_vendor_private_requests_CVE-2014-8098_6-8.patch

Comment 7 Vasyl Kaigorodov 2014-11-27 15:58:06 UTC
Created attachment 962144 [details]
0031-glx_Length_checking_for_non-generated_single_requests_(v2)_CVE-2014-8098_7-8.patch

Comment 8 Vasyl Kaigorodov 2014-11-27 15:58:09 UTC
Created attachment 962145 [details]
0032-glx_Pass_remaining_request_length_into_->varsize_(v2)_CVE-2014-8098_8-8.patch

Comment 9 Huzaifa S. Sidhpurwala 2014-12-05 06:00:54 UTC
OOB write is possible in this case via crafted client data. This could result in arbitrary code execution or even privesc.

Comment 12 Vincent Danen 2014-12-09 20:17:41 UTC
External References:

http://www.x.org/wiki/Development/Security/Advisory-2014-12-09/

Comment 13 errata-xmlrpc 2014-12-11 17:35:14 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 5

Via RHSA-2014:1982 https://rhn.redhat.com/errata/RHSA-2014-1982.html

Comment 14 errata-xmlrpc 2014-12-11 19:42:30 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7
  Red Hat Enterprise Linux 6

Via RHSA-2014:1983 https://rhn.redhat.com/errata/RHSA-2014-1983.html