Bug 1419916 (CVE-2017-2618)

Summary: CVE-2017-2618 kernel: Off-by-one error in selinux_setprocattr (/proc/self/attr/fscreate)
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: apevec, aquini, ayoung, bhu, bkearney, cbillett, chrisw, cvsbot-xmlrpc, dhoward, dominik.mierzejewski, dwalsh, fhrbata, iboverma, jjoyce, jkacur, jross, jschluet, kbasil, kernel-mgr, lgoncalv, lhh, lpeer, lvrabec, markmc, matt, mcressma, mmalik, nmurray, pholasek, plautrba, plougher, rbryant, rvrbovsk, sclewis, security-response-team, slawomir, ssekidde, tdecacqu, tomckay, williams, wmealing
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Linux kernel's handling of clearing SELinux attributes on /proc/pid/attr files. An empty (null) write to this file can crash the system by causing the system to attempt to access unmapped kernel memory.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 03:07:09 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: 1422368, 1422369, 1422370, 1422371, 1422372, 1422373, 1422717    
Bug Blocks: 1419918    

Description Adam Mariš 2017-02-07 11:59:42 UTC
A flaw was found in the Linux kernels handling of clearing SELinux attributes on /proc/pid/attr files.  An empty (null) write to this file can crash the system by causing the system to attempt to access unmapped kernel memory.

This may lead to local DoS by panicing the system.

Proposed patch:

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=0c461cb727d146c9ef2d3e86214f498b78b7d125

https://marc.info/?l=selinux&m=148588165923772&w=2

Comment 2 Paul Moore 2017-02-07 12:59:47 UTC
To be clear, the problem is not with libselinux but the kernel itself (see the proposed patch in the original problem description).

Comment 3 Adam Mariš 2017-02-07 13:08:12 UTC
(In reply to Paul Moore from comment #2)
> To be clear, the problem is not with libselinux but the kernel itself (see
> the proposed patch in the original problem description).

Ah, sorry, my fault. Fixed!

Comment 6 Wade Mealing 2017-02-15 06:39:47 UTC
Statement:

This issue does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 5, 6 due to a missing commit ( bb646cdb12e75d82258c2f2e7746d5952d3e321a ) which enabled changed system behavior.

This issue does affect Red Hat Enteprise Linux 7 and MRG-2 kernels. A future Linux kernel updates for the respective releases may address this issue.

Comment 7 Wade Mealing 2017-02-15 06:41:23 UTC
Acknowledgements:

Name: Paul Moore (Red Hat Engineering)

Comment 12 Wade Mealing 2017-02-16 01:15:32 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1422717]

Comment 13 errata-xmlrpc 2017-04-12 10:53:14 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise MRG 2

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

Comment 14 errata-xmlrpc 2017-04-12 10:56:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 15 errata-xmlrpc 2017-04-12 13:35:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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