Bug 1353534 - CVE-2016-6136 kernel: Race condition vulnerability in auditsc.c [fedora-all]
Summary: CVE-2016-6136 kernel: Race condition vulnerability in auditsc.c [fedora-all]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 24
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/linux-audit/audit-...
Whiteboard:
Depends On:
Blocks: CVE-2016-6136
TreeView+ depends on / blocked
 
Reported: 2016-07-07 11:57 UTC by Andrej Nemec
Modified: 2016-08-08 23:52 UTC (History)
9 users (show)

Fixed In Version: kernel-4.6.5-300.fc24 kernel-4.6.5-200.fc23
Doc Type: Release Note
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-08 20:25:36 UTC
Type: ---


Attachments (Terms of Use)

Description Andrej Nemec 2016-07-07 11:57:18 UTC
This is an automatically created tracking bug!  It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of Fedora.

For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.

For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs

When submitting as an update, use the fedpkg template provided in the next
comment(s).  This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.

Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.

NOTE: this issue affects multiple supported versions of Fedora. While only
one tracking bug has been filed, please correct all affected versions at
the same time.  If you need to fix the versions independent of each other,
you may clone this bug as appropriate.

Reproducers, if any, will remain confidential and never be made public, unless done so by the security team.

[bug automatically created by: add-tracking-bugs]

Comment 1 Andrej Nemec 2016-07-07 11:57:29 UTC
Use the following template to for the 'fedpkg update' request to submit an
update for this issue as it contains the top-level parent bug(s) as well as
this tracking bug.  This will ensure that all associated bugs get updated
when new packages are pushed to stable.

=====

# bugfix, security, enhancement, newpackage (required)
type=security

# testing, stable
request=testing

# Bug numbers: 1234,9876
bugs=1353533,1353534

# Description of your update
notes=Security fix for CVE-2016-6136

# Enable request automation based on the stable/unstable karma thresholds
autokarma=True
stable_karma=3
unstable_karma=-3

# Automatically close bugs when this marked as stable
close_bugs=True

# Suggest that users restart after update
suggest_reboot=False

======

Additionally, you may opt to use the bodhi web interface to submit updates:

https://bodhi.fedoraproject.org/updates/new

Comment 2 Paul Moore 2016-07-23 16:09:24 UTC
As described in the GitHub issue, the problem has been fixed upstream and can be found in the audit#next branch:

 * git://git.infradead.org/users/pcmoore/audit next

  commit 43761473c254b45883a64441dd0bc85a42f3645c
  Author: Paul Moore <paul@paul-moore.com>
  Date:   Tue Jul 19 17:42:57 2016 -0400

    audit: fix a double fetch in audit_log_single_execve_arg()
    
    There is a double fetch problem in audit_log_single_execve_arg()
    where we first check the execve(2) argumnets for any "bad" characters
    which would require hex encoding and then re-fetch the arguments for
    logging in the audit record[1].  Of course this leaves a window of
    opportunity for an unsavory application to munge with the data.
    
    This patch reworks things by only fetching the argument data once[2]
    into a buffer where it is scanned and logged into the audit
    records(s).  In addition to fixing the double fetch, this patch
    improves on the original code in a few other ways: better handling
    of large arguments which require encoding, stricter record length
    checking, and some performance improvements (completely unverified,
    but we got rid of some strlen() calls, that's got to be a good
    thing).
    
    As part of the development of this patch, I've also created a basic
    regression test for the audit-testsuite, the test can be tracked on
    GitHub at the following link:
    
     * https://github.com/linux-audit/audit-testsuite/issues/25
    
    [1] If you pay careful attention, there is actually a triple fetch
    problem due to a strnlen_user() call at the top of the function.
    
    [2] This is a tiny white lie, we do make a call to strnlen_user()
    prior to fetching the argument data.  I don't like it, but due to the
    way the audit record is structured we really have no choice unless we
    copy the entire argument at once (which would require a rather
    wasteful allocation).  The good news is that with this patch the
    kernel no longer relies on this strnlen_user() value for anything
    beyond recording it in the log, we also update it with a trustworthy
    value whenever possible.
    
    Reported-by: Pengfei Wang <wpengfeinudt@gmail.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Paul Moore <paul@paul-moore.com>

Comment 3 Josh Boyer 2016-07-25 18:43:56 UTC
Fixed in Fedora git on all branches.  Thanks Paul!

Comment 4 Fedora Update System 2016-07-29 12:20:05 UTC
kernel-4.6.5-200.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-754e4768d8

Comment 5 Fedora Update System 2016-07-29 12:20:58 UTC
kernel-4.6.5-300.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-30e3636e79

Comment 6 Fedora Update System 2016-07-30 19:26:42 UTC
kernel-4.6.5-200.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-754e4768d8

Comment 7 Fedora Update System 2016-07-30 19:27:08 UTC
kernel-4.6.5-300.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-30e3636e79

Comment 8 Fedora Update System 2016-08-08 20:24:32 UTC
kernel-4.6.5-300.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2016-08-08 23:51:45 UTC
kernel-4.6.5-200.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.