Vulnerability · Published Jul 12, 2024 · Assigned by Linux
CVE-2024-39495greybus: Fix use-after-free bug in gb_interface_release due to race condition.
High 7.8
In plain English
A high-severity use-after-free in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 25% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.99-1 | DEBIAN-CVE-2024-39495 |
| Debian:12 | linux | 6.1.99-1 | DSA-5731-1 |
| Debian:13 | linux | 6.9.7-1 | DEBIAN-CVE-2024-39495 |
| Debian:14 | linux | 6.9.7-1 | DEBIAN-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux | 5.15.0-121.131 | UBUNTU-CVE-2024-39495 |
| Ubuntu:24.04:LTS | linux | 6.8.0-44.44 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1069.75 | UBUNTU-CVE-2024-39495 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1015.16 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1015.16~22.04.1 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1072.81 | UBUNTU-CVE-2024-39495 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1014.16 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1072.81.1 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1068.76 | UBUNTU-CVE-2024-39495 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1014.16 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1066.72 | UBUNTU-CVE-2024-39495 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1010.13 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1052.59 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-45.45~22.04.1 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1062.65 | UBUNTU-CVE-2024-39495 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1012.12 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1064.70 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1066.71 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-121.131 | UBUNTU-CVE-2024-39495 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-44.44.1 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1064.65 | UBUNTU-CVE-2024-39495 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1013.14 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1013.14~22.04.1 | UBUNTU-CVE-2024-39495 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1013.14.1 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1028.28 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1016.16 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1012.12 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1067.73 | UBUNTU-CVE-2024-39495 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1012.12 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1062.65 | UBUNTU-CVE-2024-39495 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1011.12 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-44.44.1 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-39495 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1035.39 | UBUNTU-CVE-2024-39495 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 55742d2a071a569bf20f90d37b1b5b8a25a3f882 – before 74cd0a421896b2e07eafe7da4275302bfecef20155742d2a071a569bf20f90d37b1b5b8a25a3f882 – before 2b6bb0b4abfd79b8698ee161bb73c0936a2aaf8355742d2a071a569bf20f90d37b1b5b8a25a3f882 – before fb071f5c75d4b1c177824de74ee75f9dd34123b955742d2a071a569bf20f90d37b1b5b8a25a3f882 – before 9a733d69a4a59c2d08620e6589d823c24be773dc55742d2a071a569bf20f90d37b1b5b8a25a3f882 – before 0b8fba38bdfb848fac52e71270b2aa3538c996ea55742d2a071a569bf20f90d37b1b5b8a25a3f882 – before 03ea2b129344152157418929f06726989efc044555742d2a071a569bf20f90d37b1b5b8a25a3f882 – before 5c9c5d7f26acc2c669c1dcf57d1bb43ee99220ce |
| Linux | Linux | 4.9 |
Weakness: CWE-416 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://git.kernel.org/stable/c/74cd0a421896b2e07eafe7da4275302bfecef201
- https://git.kernel.org/stable/c/2b6bb0b4abfd79b8698ee161bb73c0936a2aaf83
- https://git.kernel.org/stable/c/fb071f5c75d4b1c177824de74ee75f9dd34123b9
- https://git.kernel.org/stable/c/9a733d69a4a59c2d08620e6589d823c24be773dc
- https://git.kernel.org/stable/c/0b8fba38bdfb848fac52e71270b2aa3538c996ea
- https://git.kernel.org/stable/c/03ea2b129344152157418929f06726989efc0445
- https://git.kernel.org/stable/c/5c9c5d7f26acc2c669c1dcf57d1bb43ee99220ce
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html