Linux Kernel up to 6.6.36/6.9.7 drm_file drm_file_update_pid 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.
6.7$0-$5k0.00

Summaryinfo

A vulnerability has been found in Linux Kernel up to 6.6.36/6.9.7 and classified as critical. This vulnerability affects the function drm_file_update_pid of the component drm_file. This manipulation causes use after free. This vulnerability is tracked as CVE-2024-39486. Moreover, an exploit is present. The affected component should be upgraded.

Detailsinfo

A vulnerability has been found in Linux Kernel up to 6.6.36/6.9.7 and classified as critical. Affected by this vulnerability is the function drm_file_update_pid of the component drm_file. The manipulation with an unknown input leads to a use after free vulnerability. The CWE definition for the vulnerability is CWE-416. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. As an impact it is known to affect confidentiality, integrity, and availability. The summary by CVE is:

In the Linux kernel, the following vulnerability has been resolved: drm/drm_file: Fix pid refcounting race filp->pid is supposed to be a refcounted pointer; however, before this patch, drm_file_update_pid() only increments the refcount of a struct pid after storing a pointer to it in filp->pid and dropping the dev->filelist_mutex, making the following race possible: process A process B ========= ========= begin drm_file_update_pid mutex_lock(&dev->filelist_mutex) rcu_replace_pointer(filp->pid, , 1) mutex_unlock(&dev->filelist_mutex) begin drm_file_update_pid mutex_lock(&dev->filelist_mutex) rcu_replace_pointer(filp->pid, , 1) mutex_unlock(&dev->filelist_mutex) get_pid() synchronize_rcu() put_pid() *** pid B reaches refcount 0 and is freed here *** get_pid() *** UAF *** synchronize_rcu() put_pid() As far as I know, this race can only occur with CONFIG_PREEMPT_RCU=y because it requires RCU to detect a quiescent state in code that is not explicitly calling into the scheduler. This race leads to use-after-free of a "struct pid". It is probably somewhat hard to hit because process A has to pass through a synchronize_rcu() operation while process B is between mutex_unlock() and get_pid(). Fix it by ensuring that by the time a pointer to the current task's pid is stored in the file, an extra reference to the pid has been taken. This fix also removes the condition for synchronize_rcu(); I think that optimization is unnecessary complexity, since in that case we would usually have bailed out on the lockless check above.

It is possible to read the advisory at git.kernel.org. This vulnerability is known as CVE-2024-39486 since 06/25/2024. The exploitation appears to be difficult. Technical details and also a public exploit are known.

It is possible to download the exploit at packetstormsecurity.com. It is declared as proof-of-concept. The vulnerability scanner Nessus provides a plugin with the ID 210060 (Ubuntu 22.04 LTS / 24.04 LTS : Linux kernel kernel vulnerabilities (USN-7089-1)), which helps to determine the existence of the flaw in a target environment.

Upgrading to version 6.6.37 or 6.9.8 eliminates this vulnerability. Applying the patch 16682588ead4/0acce2a5c619/4f2a129b33a2 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the vulnerability database at Tenable (210060). Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 7.1
VulDB Meta Temp Score: 6.7

VulDB Base Score: 7.1
VulDB Temp Score: 6.4
VulDB Vector: 🔍
VulDB Reliability: 🔍

NVD Base Score: 7.0
NVD Vector: 🔍

CVSSv2info

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

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

Exploitinginfo

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

Physical: Partially
Local: Yes
Remote: Partially

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Download: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 210060
Nessus Name: Ubuntu 22.04 LTS / 24.04 LTS : Linux kernel kernel vulnerabilities (USN-7089-1)

Threat Intelligenceinfo

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

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: Kernel 6.6.37/6.9.8
Patch: 16682588ead4/0acce2a5c619/4f2a129b33a2

Timelineinfo

06/25/2024 🔍
07/06/2024 +11 days 🔍
07/06/2024 +0 days 🔍
11/02/2024 +119 days 🔍

Sourcesinfo

Vendor: kernel.org

Advisory: git.kernel.org
Status: Confirmed

CVE: CVE-2024-39486 (🔍)
GCVE (CVE): GCVE-0-2024-39486
GCVE (VulDB): GCVE-100-270427
scip Labs: https://www.scip.ch/en/?labs.20161013

Entryinfo

Created: 07/06/2024 11:49
Updated: 11/02/2024 03:02
Changes: 07/06/2024 11:49 (58), 07/09/2024 04:15 (1), 08/05/2024 20:34 (10), 08/22/2024 16:05 (11), 11/02/2024 03:02 (2)
Complete: 🔍
Cache ID: 216::103

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you want to use VulDB in your project?

Use the official API to access entries easily!