Bug 1179813 (CVE-2014-9529)

Summary: CVE-2014-9529 kernel: use-after-free during key garbage collection
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: agordeev, aquini, davej, dhoward, fhrbata, gansalmon, itamar, jforbes, jonathan, jrusnack, jwboyer, kernel-maint, kernel-mgr, lwang, madhu.chinakonda, mchehab, mguzik, nmurray, pholasek, plougher, pmatouse, rvrbovsk
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A race condition flaw was found in the way the Linux kernel keys management subsystem performed key garbage collection. A local attacker could attempt accessing a key while it was being garbage collected, which would cause the system to crash.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-23 12:16:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1179849, 1179850, 1179851, 1179852, 1179853, 1179854, 1223790, 1223791    
Bug Blocks: 1179815    

Description Vincent Danen 2015-01-07 15:29:50 UTC
It was reported [1] that the Linux kernel suffered from a flaw when doing key garbage collection.  The patch [1] describes the issue as:

"""
When a key is being garbage collected, it's key->user would get put before
the ->destroy() callback is called, where the key is removed from it's
respective tracking structures.

This leaves a key hanging in a semi-invalid state which leaves a window open
for a different task to try an access key->user. An example is
find_keyring_by_name() which would dereference key->user for a key that is
in the process of being garbage collected (where key->user was freed but
->destroy() wasn't called yet - so it's still present in the linked list).

"""

An unprivileged local user could use this flaw to crash the system.

[1] http://marc.info/?l=linux-kernel&m=141986398232547&w=2

Comment 1 Petr Matousek 2015-01-07 16:27:31 UTC
Statement:

This issue does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 5.

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

Comment 4 Petr Matousek 2015-01-07 16:28:59 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1179853]

Comment 5 Fedora Update System 2015-01-11 02:58:10 UTC
kernel-3.17.8-300.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2015-01-13 00:05:45 UTC
kernel-3.17.8-200.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 errata-xmlrpc 2015-04-21 15:02:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

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

Comment 10 errata-xmlrpc 2015-06-23 08:25:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 11 errata-xmlrpc 2015-06-23 08:28:24 UTC
This issue has been addressed in the following products:

  MRG for RHEL-6 v.2

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

Comment 12 errata-xmlrpc 2015-06-23 08:47:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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