Back

MEDIUM

kernel: ping sockets: use-after-free leading to local privilege escalation

Published Aug 6, 2015

Description

The ping_unhash function in net/ipv4/ping.c in the Linux kernel before 4.0.3 does not initialize a certain list data structure during an unhash operation, which allows local users to gain privileges or cause a denial of service (use-after-free and system crash) by leveraging the ability to make a SOCK_DGRAM socket system call for the IPPROTO_ICMP or IPPROTO_ICMPV6 protocol, and then making a connect system call after a disconnect.

Affected products

Remediation

Red Hat 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 "10").

Red Hat 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 = 10 "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.

Metrics

Weaknesses (1)

References (31)

Change history (0)

No recorded changes yet.

Sources
CVE.org / MITRE
Status PUBLISHED
Assigner mitre
Published Aug 6, 2015
Updated Aug 6, 2024
Reserved May 2, 2015
NVD
Status Modified
Modified Jun 17, 2026
Red Hat
Severity Moderate
Public date May 2, 2015