Bug 1373966 (CVE-2016-7042)

Summary: CVE-2016-7042 kernel: Stack corruption while reading /proc/keys when gcc stack protector is enabled
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: aquini, bhu, carnil, dhoward, dominik.mierzejewski, fhrbata, iboverma, jkacur, jross, kernel-mgr, lgoncalv, matt, mcressma, nmurray, plougher, rvrbovsk, security-response-team, slawomir, vdronov, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
It was found that when the gcc stack protector was enabled, reading the /proc/keys file could cause a panic in the Linux kernel due to stack corruption. This happened because an incorrect buffer size was used to hold a 64-bit timeout value rendered as weeks.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 02:58:19 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: 1373499, 1375208, 1375209, 1375210, 1375211, 1375212    
Bug Blocks: 1373967    
Attachments:
Description Flags
Fix for buffer overflow in proc_keys_show none

Description Adam Mariš 2016-09-07 14:48:59 UTC
It was found that when gcc stack protector is turned on, proc_keys_show() can cause a panic due to stack corruption. This happens because xbuf[] is not big enough to hold a 64-bit timeout rendered as weeks.

Product bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1373499

Comment 1 Adam Mariš 2016-09-07 14:49:03 UTC
Acknowledgments:

Name: Ondrej Kozina (Red Hat)

Comment 7 Vladis Dronov 2016-09-12 13:40:18 UTC
Statement:

This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 5. This has been rated as having Moderate security impact and is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.

This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 6, 7 and Red Hat Enterprise MRG-2. Future Linux kernel updates for the respective releases might address this issue.

Comment 8 Vladis Dronov 2016-09-12 13:42:25 UTC
Created attachment 1200212 [details]
Fix for buffer overflow in proc_keys_show

Comment 9 Vladis Dronov 2016-10-13 12:31:14 UTC
cve-id CVE-2016-7042 was assigned to this flaw internally by the Red Hat. please, use it in the public communications regarding this flaw.

Comment 11 errata-xmlrpc 2017-03-21 13:14:56 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

Via RHSA-2017:0817 https://rhn.redhat.com/errata/RHSA-2017-0817.html

Comment 12 errata-xmlrpc 2017-08-01 19:09:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:2077 https://access.redhat.com/errata/RHSA-2017:2077

Comment 13 errata-xmlrpc 2017-08-02 07:48:19 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:1842 https://access.redhat.com/errata/RHSA-2017:1842

Comment 14 errata-xmlrpc 2017-09-06 20:38:04 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise MRG 2

Via RHSA-2017:2669 https://access.redhat.com/errata/RHSA-2017:2669