7.8
HIGH
CVE-2024-39495
Linux Greybus UAF Vulnerability
Description

In the Linux kernel, the following vulnerability has been resolved: greybus: Fix use-after-free bug in gb_interface_release due to race condition. In gb_interface_create, &intf->mode_switch_completion is bound with gb_interface_mode_switch_work. Then it will be started by gb_interface_request_mode_switch. Here is the relevant code. if (!queue_work(system_long_wq, &intf->mode_switch_work)) { ... } If we call gb_interface_release to make cleanup, there may be an unfinished work. This function will call kfree to free the object "intf". However, if gb_interface_mode_switch_work is scheduled to run after kfree, it may cause use-after-free error as gb_interface_mode_switch_work will use the object "intf". The possible execution flow that may lead to the issue is as follows: CPU0 CPU1 | gb_interface_create | gb_interface_request_mode_switch gb_interface_release | kfree(intf) (free) | | gb_interface_mode_switch_work | mutex_lock(&intf->mutex) (use) Fix it by canceling the work before kfree.

INFO

Published Date :

July 12, 2024, 1:15 p.m.

Last Modified :

Aug. 20, 2024, 3:35 p.m.

Source :

416baaa9-dc9f-4396-8d5f-8c081fb06d67

Remotely Exploitable :

No

Impact Score :

5.9

Exploitability Score :

1.8
Affected Products

The following products are affected by CVE-2024-39495 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Linux linux_kernel

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2024-39495 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2024-39495 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Aug. 20, 2024

    Action Type Old Value New Value
    Added CWE CISA-ADP CWE-416
    Added CVSS V3.1 CISA-ADP AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Initial Analysis by [email protected]

    Jul. 24, 2024

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://git.kernel.org/stable/c/03ea2b129344152157418929f06726989efc0445 No Types Assigned https://git.kernel.org/stable/c/03ea2b129344152157418929f06726989efc0445 Patch
    Changed Reference Type https://git.kernel.org/stable/c/0b8fba38bdfb848fac52e71270b2aa3538c996ea No Types Assigned https://git.kernel.org/stable/c/0b8fba38bdfb848fac52e71270b2aa3538c996ea Patch
    Changed Reference Type https://git.kernel.org/stable/c/2b6bb0b4abfd79b8698ee161bb73c0936a2aaf83 No Types Assigned https://git.kernel.org/stable/c/2b6bb0b4abfd79b8698ee161bb73c0936a2aaf83 Patch
    Changed Reference Type https://git.kernel.org/stable/c/5c9c5d7f26acc2c669c1dcf57d1bb43ee99220ce No Types Assigned https://git.kernel.org/stable/c/5c9c5d7f26acc2c669c1dcf57d1bb43ee99220ce Patch
    Changed Reference Type https://git.kernel.org/stable/c/74cd0a421896b2e07eafe7da4275302bfecef201 No Types Assigned https://git.kernel.org/stable/c/74cd0a421896b2e07eafe7da4275302bfecef201 Patch
    Changed Reference Type https://git.kernel.org/stable/c/9a733d69a4a59c2d08620e6589d823c24be773dc No Types Assigned https://git.kernel.org/stable/c/9a733d69a4a59c2d08620e6589d823c24be773dc Patch
    Changed Reference Type https://git.kernel.org/stable/c/fb071f5c75d4b1c177824de74ee75f9dd34123b9 No Types Assigned https://git.kernel.org/stable/c/fb071f5c75d4b1c177824de74ee75f9dd34123b9 Patch
    Added CWE NIST CWE-416
    Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions up to (excluding) 5.4.279 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.5 up to (excluding) 5.10.221 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.11 up to (excluding) 5.15.162 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.16 up to (excluding) 6.1.95 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.2 up to (excluding) 6.6.35 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.7 up to (excluding) 6.9.6
  • CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Jul. 12, 2024

    Action Type Old Value New Value
    Added Description In the Linux kernel, the following vulnerability has been resolved: greybus: Fix use-after-free bug in gb_interface_release due to race condition. In gb_interface_create, &intf->mode_switch_completion is bound with gb_interface_mode_switch_work. Then it will be started by gb_interface_request_mode_switch. Here is the relevant code. if (!queue_work(system_long_wq, &intf->mode_switch_work)) { ... } If we call gb_interface_release to make cleanup, there may be an unfinished work. This function will call kfree to free the object "intf". However, if gb_interface_mode_switch_work is scheduled to run after kfree, it may cause use-after-free error as gb_interface_mode_switch_work will use the object "intf". The possible execution flow that may lead to the issue is as follows: CPU0 CPU1 | gb_interface_create | gb_interface_request_mode_switch gb_interface_release | kfree(intf) (free) | | gb_interface_mode_switch_work | mutex_lock(&intf->mutex) (use) Fix it by canceling the work before kfree.
    Added Reference kernel.org https://git.kernel.org/stable/c/74cd0a421896b2e07eafe7da4275302bfecef201 [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/2b6bb0b4abfd79b8698ee161bb73c0936a2aaf83 [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/fb071f5c75d4b1c177824de74ee75f9dd34123b9 [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/9a733d69a4a59c2d08620e6589d823c24be773dc [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/0b8fba38bdfb848fac52e71270b2aa3538c996ea [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/03ea2b129344152157418929f06726989efc0445 [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/5c9c5d7f26acc2c669c1dcf57d1bb43ee99220ce [No types assigned]
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2024-39495 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2024-39495 weaknesses.

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability