Linux Kernel up to 4.8.12 net/packet/af_packet.c use after free

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.8$0-$5k0.00

Summaryinfo

A vulnerability described as problematic has been identified in Linux Kernel up to 4.8.12. The impacted element is an unknown function of the file net/packet/af_packet.c. Such manipulation leads to use after free. This vulnerability is referenced as CVE-2016-8655. The attack can only be performed from a local environment. Furthermore, an exploit is available. It is advisable to implement a patch to correct this issue.

Detailsinfo

A vulnerability, which was classified as problematic, has been found in Linux Kernel up to 4.8.12 (Operating System). Affected by this issue is an unknown code block of the file net/packet/af_packet.c. The manipulation with an unknown input leads to a use after free vulnerability. Using CWE to declare the problem leads to CWE-416. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. Impacted is availability. CVE summarizes:

Race condition in net/packet/af_packet.c in the Linux kernel through 4.8.12 allows local users to gain privileges or cause a denial of service (use-after-free) by leveraging the CAP_NET_RAW capability to change a socket version, related to the packet_set_ring and packet_setsockopt functions.

The weakness was published 12/08/2016 (Website). The advisory is shared for download at kernel.org. This vulnerability is handled as CVE-2016-8655. The exploitation is known to be easy. The attack needs to be approached locally. No form of authentication is required for exploitation. Technical details as well as a public exploit are known. The advisory points out:

When packet_set_ring creates a ring buffer it will initialize a struct timer_list if the packet version is TPACKET_V3. This value can then be raced by a different thread calling setsockopt to set the version to TPACKET_V1 before packet_set_ring has finished. This leads to a use-after-free on a function pointer in the struct timer_list when the socket is closed as the previously initialized timer will not be deleted.

The exploit is available at exploit-db.com. It is declared as highly functional. The vulnerability scanner Nessus provides a plugin with the ID 95801 (SUSE SLES12 Security Update : kernel (SUSE-SU-2016:3111-1)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family SuSE Local Security Checks. The commercial vulnerability scanner Qualys is able to test this issue with plugin 169421 (SUSE Enterprise Linux Security Update for the Linux Kernel (SUSE-SU-2016:3049-1)).

Applying a patch is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The advisory contains the following remark:

The bug is fixed by taking lock_sock(sk) in packet_setsockopt when changing the packet version while also taking the lock at the start of packet_set_ring.

The vulnerability is also documented in the databases at Exploit-DB (40871), Tenable (95801), SecurityFocus (BID 94692†) and SecurityTracker (ID 1037403†). seclists.org is providing further details. Similar entries are available at VDB-75570, VDB-92354, VDB-93803 and VDB-94739. If you want to get best quality of vulnerability data, you may have to visit VulDB.

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

Video

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.9
VulDB Meta Temp Score: 5.8

VulDB Base Score: 4.0
VulDB Temp Score: 3.8
VulDB Vector: 🔍
VulDB Reliability: 🔍

NVD Base Score: 7.8
NVD Vector: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Use after free
CWE: CWE-416 / CWE-119
CAPEC: 🔍
ATT&CK: 🔍

Physical: Partially
Local: Yes
Remote: No

Availability: 🔍
Access: Public
Status: Highly functional
Download: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 95801
Nessus Name: SUSE SLES12 Security Update : kernel (SUSE-SU-2016:3111-1)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍

OpenVAS ID: 802886
OpenVAS Name: SuSE Update for Kernel openSUSE-SU-2016:3061-1 (Kernel)
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

MetaSploit ID: af_packet_chocobo_root_priv_esc.rb
MetaSploit Name: AF_PACKET chocobo_root Privilege Escalation
MetaSploit File: 🔍

Exploit-DB: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Patch
Status: 🔍

0-Day Time: 🔍

Patch: git.kernel.org

Timelineinfo

10/12/2016 🔍
12/08/2016 +57 days 🔍
12/08/2016 +0 days 🔍
12/08/2016 +0 days 🔍
12/09/2016 +1 days 🔍
11/02/2024 +2885 days 🔍

Sourcesinfo

Vendor: kernel.org

Advisory: USN-3149-1
Status: Confirmed

CVE: CVE-2016-8655 (🔍)
GCVE (CVE): GCVE-0-2016-8655
GCVE (VulDB): GCVE-100-93980
SecurityFocus: 94692
SecurityTracker: 1037403 - Linux Kernel packet_set_ring() Race Condition Lets Local Users Obtain Root Privileges

scip Labs: https://www.scip.ch/en/?labs.20161013
Misc.: 🔍
See also: 🔍

Entryinfo

Created: 12/09/2016 07:48
Updated: 11/02/2024 21:16
Changes: 12/09/2016 07:48 (51), 05/17/2018 23:27 (26), 10/05/2022 08:29 (4), 10/05/2022 08:33 (12), 10/05/2022 08:34 (1), 11/02/2024 21:16 (14)
Complete: 🔍
Cache ID: 216:7C9:103

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you know our Splunk app?

Download it now for free!