Bug 1218074 (CVE-2015-3636)

Summary: CVE-2015-3636 kernel: ping sockets: use-after-free leading to local privilege escalation
Product: [Other] Security Response Reporter: Petr Matousek <pmatouse>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: aquini, arm-mgr, bhu, blc, carnil, dhoward, fhrbata, gansalmon, iboverma, itamar, jforbes, jkacur, joelsmith, jonathan, jross, jwboyer, kernel-maint, kernel-mgr, lgoncalv, madhu.chinakonda, matt, mchehab, mcressma, mlangsdo, nmurray, plougher, ppandit, rt-maint, rvrbovsk, 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 the Linux kernel's ping socket implementation did not properly handle socket unhashing during spurious disconnects, which could lead to a use-after-free flaw. On x86-64 architecture systems, a local user able to create ping sockets could use this flaw to crash the system. On non-x86-64 architecture systems, a local user able to create ping sockets could use this flaw to escalate their privileges on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 02:41:00 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: 1218100, 1218101, 1218102, 1218103, 1218104, 1218105, 1218106, 1218107, 1218108, 1218110, 1218112, 1218113    
Bug Blocks: 1218075    

Description Petr Matousek 2015-05-04 07:53:34 UTC
It was found that the Linux kernel's ping socket implementation didn't properly
handle socket unhashing during spurious disconnects which could lead to
use-after-free flaw.

On x86-64 architecture systems, a local user able to create ping sockets could
use this flaw to crash the system.

On non-x86-64 architecture systems, a local user able to create ping sockets
could use this flaw to increase their privileges on the system.

Note: By default ping sockets are disabled on the system
(net.ipv4.ping_group_range = 1	0) and have to be explicitly enabled by the
system administrator for specific user groups in order to exploit this issue.

Upstream fix:
https://github.com/torvalds/linux/commit/a134f083e79fb4c3d0a925691e732c56911b4326

References:
http://www.openwall.com/lists/oss-security/2015/05/02/5

Comment 6 Petr Matousek 2015-05-04 08:37:39 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1218110]

Comment 8 Petr Matousek 2015-05-04 08:44:38 UTC
Statement:

This issue does not affect the Linux kernel as shipped with Red Hat Enterprise Linux 5. This issue does affect the Linux kernel as shipped with Red Hat Enterprise Linux 6, 7 and Red Hat Enterprise MRG 2. Future kernel updates for the respective releases will address this issue.

Please note that on x86-64 architecture systems the impact is limited to local Denial of Service and that the ping sockets functionality is disabled by default (net.ipv4.ping_group_range sysctl is "1	0").

Comment 9 Petr Matousek 2015-05-04 08:54:10 UTC
Mitigation:

You can check whether ping socket functionality is enabled by examining the net.ipv4.ping_group_range sysctl value:

~]# sysctl net.ipv4.ping_group_range
net.ipv4.ping_group_range = 1	0

"1 0" is the default value and disables the ping socket functionality even for root user. Any other value means that the ping socket functionality might be enabled for certain users on the system.

To mitigate this vulnerability make sure that you either allow the functionality to trusted local users (groups) only or set the net.ipv4.ping_group_range sysctl to the default and disabled state:

~]# sysctl net.ipv4.ping_group_range="1 0"

Please note that this might prevent some programs relying on this functionality from functioning properly.

Comment 10 Fedora Update System 2015-05-11 19:03:15 UTC
kernel-4.0.2-300.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2015-05-12 20:40:55 UTC
kernel-3.19.7-200.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2015-05-26 03:56:00 UTC
kernel-3.19.8-100.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 errata-xmlrpc 2015-07-14 15:14:55 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

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

Comment 14 errata-xmlrpc 2015-08-05 18:49:43 UTC
This issue has been addressed in the following products:

  MRG for RHEL-6 v.2

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

Comment 15 errata-xmlrpc 2015-08-05 20:14:07 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2015:1565 https://access.redhat.com/errata/RHSA-2015:1565

Comment 16 errata-xmlrpc 2015-08-06 02:43:07 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 17 errata-xmlrpc 2015-08-11 14:40:32 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.5 EUS - Server and Compute Node Only

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

Comment 18 errata-xmlrpc 2015-08-18 18:38:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.4 AUS - Server Only

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