Vulnerability · Published May 20, 2024 · Assigned by Linux
CVE-2024-35955kprobes: Fix possible use-after-free issue on kprobe registration
High 8.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 1.2% (higher than 68% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: kprobes: Fix possible use-after-free issue on kprobe registration When unloading a module, its state is changing MODULE_STATE_LIVE -> MODULE_STATE_GOING -> MODULE_STATE_UNFORMED. Each change will take a time. `is_module_text_address()` and `__module_text_address()` works with MODULE_STATE_LIVE and MODULE_STATE_GOING. If we use `is_module_text_address()` and `__module_text_address()` separately, there is a chance that the first one is succeeded but the next one is failed because module->state becomes MODULE_STATE_UNFORMED between those operations. In `check_kprobe_address_safe()`, if the second `__module_text_address()` is failed, that is ignored because it expected a kernel_text address. But it may have failed simply because module->state has been changed to MODULE_STATE_UNFORMED. In this case, arm_kprobe() will try to modify non-exist module text address (use-after-free). To fix this problem, we should not use separated `is_module_text_address()` and `__module_text_address()`, but use only `__module_text_address()` once and do `try_module_get(module)` which is only available with MODULE_STATE_LIVE.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.90-1 | DEBIAN-CVE-2024-35955 |
| Debian:13 | linux | 6.8.9-1 | DEBIAN-CVE-2024-35955 |
| Debian:14 | linux | 6.8.9-1 | DEBIAN-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux | 5.15.0-116.126 | UBUNTU-CVE-2024-35955 |
| Ubuntu:24.04:LTS | linux | 6.8.0-38.38 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1065.71 | UBUNTU-CVE-2024-35955 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1011.12 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1011.12~22.04.1 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1068.77 | UBUNTU-CVE-2024-35955 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1010.10 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1010.10~22.04.1 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1068.77.1 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1064.72 | UBUNTU-CVE-2024-35955 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1010.11 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1062.68 | UBUNTU-CVE-2024-35955 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1006.9 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1048.55 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1058.61 | UBUNTU-CVE-2024-35955 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1008.8 | UBUNTU-CVE-2024-35955 |
| Ubuntu:24.04:LTS | linux-intel | 6.8.0-1007.14 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1060.66 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1062.67 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-116.126 | UBUNTU-CVE-2024-35955 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-38.38.1 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1060.61 | UBUNTU-CVE-2024-35955 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1009.9 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1009.9~22.04.1 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1026.26 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1015.15 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1008.8 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1063.69 | UBUNTU-CVE-2024-35955 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1008.8 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1008.8~22.04.1 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1058.61 | UBUNTU-CVE-2024-35955 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1007.7 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-38.38.1 | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-35955 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1035.39 | UBUNTU-CVE-2024-35955 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 1c836bad43f3e2ff71cc397a6e6ccb4e7bd116f8 – before b5808d40093403334d939e2c3c417144d12a6f336a119c1a584aa7a2c6216458f1f272bf1bc93a93 – before 93eb31e7c3399e326259f2caa17be1e821f5a4122a49b025c36ae749cee7ccc4b7e456e02539cdc3 – before 5062d1f4f07facbdade0f402d9a04a788f52e26da1edb85e60fdab1e14db63ae8af8db3f0d798fb6 – before 2df2dd27066cdba8041e46a64362325626bdfb2e28f6c37a2910f565b4f5960df52b2eccae28c891 – before 62029bc9ff2c17a4e3a2478d83418ec57541380828f6c37a2910f565b4f5960df52b2eccae28c891 – before d15023fb407337028a654237d8968fefdcf87c2f28f6c37a2910f565b4f5960df52b2eccae28c891 – before 36b57c7d2f8b7de224980f1a284432846ad71ca028f6c37a2910f565b4f5960df52b2eccae28c891 – before 325f3fb551f8cd672dbbfc4cf58b14f9ee3fc9e8 |
| Linux | Linux | 6.0 |
Weakness: CWE-416 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://git.kernel.org/stable/c/b5808d40093403334d939e2c3c417144d12a6f33
- https://git.kernel.org/stable/c/93eb31e7c3399e326259f2caa17be1e821f5a412
- https://git.kernel.org/stable/c/5062d1f4f07facbdade0f402d9a04a788f52e26d
- https://git.kernel.org/stable/c/2df2dd27066cdba8041e46a64362325626bdfb2e
- https://git.kernel.org/stable/c/62029bc9ff2c17a4e3a2478d83418ec575413808
- https://git.kernel.org/stable/c/d15023fb407337028a654237d8968fefdcf87c2f
- https://git.kernel.org/stable/c/36b57c7d2f8b7de224980f1a284432846ad71ca0
- https://git.kernel.org/stable/c/325f3fb551f8cd672dbbfc4cf58b14f9ee3fc9e8
- https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html x_transferred
- https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html x_transferred
- https://cert-portal.siemens.com/productcert/html/ssa-265688.html
- https://cert-portal.siemens.com/productcert/html/ssa-613116.html