Bug 1428319 (CVE-2017-2636)

Summary: CVE-2017-2636 kernel: Race condition access to n_hdlc.tbuf causes double free in n_hdlc_release()
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: agordeev, aquini, bhu, carnil, dhoward, esammons, fhrbata, hannsj_uhl, iboverma, jkacur, jross, kent, lav, lgoncalv, lwang, matt, mcressma, mdshaikh, mguzik, mvermaes, nmurray, pasteur, pholasek, plougher, pmatouse, rvrbovsk, security-response-team, slawomir, williams, yozone
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 race condition flaw was found in the N_HLDC Linux kernel driver when accessing n_hdlc.tbuf list that can lead to double free. A local, unprivileged user able to set the HDLC line discipline on the tty device could use this flaw to increase their privileges on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-17 03:18:45 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: 1429917, 1429918, 1429919, 1429920, 1429921, 1429922, 1429923, 1430049, 1431120, 1431121, 1431123, 1431124, 1431125, 1431126, 1431127, 1431135    
Bug Blocks: 1428323    

Description Adam Mariš 2017-03-02 10:06:46 UTC
A race condition flaw was found in the N_HLDC Linux kernel driver when accessing n_hdlc.tbuf that can lead to double free.

A local, unprivileged user able to set the HDLC line discipline on the tty device could use this flaw to increase their privileges on the system.

Comment 2 Adam Mariš 2017-03-02 10:29:34 UTC
Acknowledgments:

Name: Alexander Popov

Comment 3 Petr Matousek 2017-03-07 13:23:29 UTC
Mitigation:

The  n_hdlc kernel module will be automatically loaded when an application  attempts to use the HDLC line discipline from userspace.  This module  can be prevented from being loaded by using the system-wide modprobe  rules. The following command, run as root, will prevent accidental or  intentional loading of the module.  Red Hat Product Security believe  this method is a robust method to prevent accidental loading of the  module, even by privileged users.

​# echo "install n_hdlc /bin/true" >> /etc/modprobe.d/disable-n_hdlc.conf

The  system will need to be restarted if the n_hdlc modules are already  loaded.  In most circumstances, the n_hdlc kernel modules will be unable to be unloaded if in use and while any current process using this line  discipline is required.

Exploiting this flaw does not require Microgate or SyncLink hardware to be in use.

If further assistance is needed, see this KCS article ( https://access.redhat.com/solutions/41278 ) or contact Red Hat Global Support Services.

Comment 4 Petr Matousek 2017-03-07 13:25:50 UTC
Statement:

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

This issue does affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 6, 7 and Red Hat Enterprise MRG 2. As this issue is rated as Important, it has been scheduled to be fixed in future updates for the respective releases.

Comment 8 Vincent Danen 2017-03-07 18:37:28 UTC
Was noted and made public here: http://www.openwall.com/lists/oss-security/2017/03/07/6

Comment 9 Prasad Pandit 2017-03-07 18:39:31 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1430049]

Comment 16 errata-xmlrpc 2017-04-11 11:48:03 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

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

Comment 17 errata-xmlrpc 2017-04-12 10:54:59 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 18 errata-xmlrpc 2017-04-12 10:57:51 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 19 errata-xmlrpc 2017-04-12 13:39:10 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

Comment 20 errata-xmlrpc 2017-04-18 09:50:15 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.4 Advanced Update Support

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

Comment 21 errata-xmlrpc 2017-04-25 09:57:41 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.2 Advanced Update Support

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

Comment 22 errata-xmlrpc 2017-04-25 09:58:51 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.2 Extended Update Support

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

Comment 23 errata-xmlrpc 2017-05-16 09:44:21 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.5 Advanced Update Support
  Red Hat Enterprise Linux 6.5 Telco Extended Update Support

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

Comment 24 errata-xmlrpc 2017-05-16 09:54:40 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.7 Extended Update Support

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

Comment 25 errata-xmlrpc 2017-06-19 18:50:11 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.6 Advanced Update Support
  Red Hat Enterprise Linux 6.6 Telco Extended Update Support

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