Vulnerability · Published Jun 19, 2024 · Assigned by Linux
CVE-2024-38588ftrace: Fix possible use-after-free issue in ftrace_location()
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.2% (higher than 15% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: ftrace: Fix possible use-after-free issue in ftrace_location() KASAN reports a bug: BUG: KASAN: use-after-free in ftrace_location+0x90/0x120 Read of size 8 at addr ffff888141d40010 by task insmod/424 CPU: 8 PID: 424 Comm: insmod Tainted: G W 6.9.0-rc2+ [...] Call Trace: <TASK> dump_stack_lvl+0x68/0xa0 print_report+0xcf/0x610 kasan_report+0xb5/0xe0 ftrace_location+0x90/0x120 register_kprobe+0x14b/0xa40 kprobe_init+0x2d/0xff0 [kprobe_example] do_one_initcall+0x8f/0x2d0 do_init_module+0x13a/0x3c0 load_module+0x3082/0x33d0 init_module_from_file+0xd2/0x130 __x64_sys_finit_module+0x306/0x440 do_syscall_64+0x68/0x140 entry_SYSCALL_64_after_hwframe+0x71/0x79 The root cause is that, in lookup_rec(), ftrace record of some address is being searched in ftrace pages of some module, but those ftrace pages at the same time is being freed in ftrace_release_mod() as the corresponding module is being deleted: CPU1 | CPU2 register_kprobes() { | delete_module() { check_kprobe_address_safe() { | arch_check_ftrace_location() { | ftrace_location() { | lookup_rec() // USE! | ftrace_release_mod() // Free! To fix this issue: 1. Hold rcu lock as accessing ftrace pages in ftrace_location_range(); 2. Use ftrace_location_range() instead of lookup_rec() in ftrace_location(); 3. Call synchronize_rcu() before freeing any ftrace pages both in ftrace_process_locs()/ftrace_release_mod()/ftrace_free_mem().
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.94-1 | DEBIAN-CVE-2024-38588 |
| Debian:13 | linux | 6.8.12-1 | DEBIAN-CVE-2024-38588 |
| Debian:14 | linux | 6.8.12-1 | DEBIAN-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux | 5.15.0-121.131 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux | 5.15.0-121.131 | USN-7007-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-40.40 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1069.75 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1069.75 | USN-7007-1 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1013.14 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1013.14~22.04.1 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1072.81 | USN-7009-1 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1072.81 | UBUNTU-CVE-2024-38588 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1012.14 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1012.14~22.04.1 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1072.81.1 | USN-7009-1 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1072.81.1 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1068.76 | USN-7007-1 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1068.76 | UBUNTU-CVE-2024-38588 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1012.13 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1012.13~22.04.1 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1066.72 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1066.72 | USN-7007-1 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1008.11 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1052.59 | USN-7007-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1052.59 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-40.40~22.04.3 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1062.65 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1062.65 | USN-7007-1 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1010.10 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1010.10~22.04.1 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1064.70 | USN-7007-1 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1064.70 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1066.71 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1066.71 | USN-7007-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-121.131 | USN-7007-3 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-121.131 | UBUNTU-CVE-2024-38588 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-40.40.1 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-40.40.1~22.04.1 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1064.65 | USN-7007-1 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1064.65 | UBUNTU-CVE-2024-38588 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1011.11 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1011.11~22.04.1 | UBUNTU-CVE-2024-38588 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1011.11.1 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1028.28 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1016.16 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1010.10 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1067.73 | USN-7007-1 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1067.73 | UBUNTU-CVE-2024-38588 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1010.10 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1010.10~22.04.1 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1062.65 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1062.65 | USN-7007-1 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1009.10 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-40.40.1 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-40.40.1~22.04.1 | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-38588 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1035.39 | UBUNTU-CVE-2024-38588 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | ae6aa16fdc163afe6b04b6c073ad4ddd4663c03b – before eea46baf145150910ba134f75a67106ba2222c1bae6aa16fdc163afe6b04b6c073ad4ddd4663c03b – before 1880a324af1c95940a7c954b6b937e86844a33bdae6aa16fdc163afe6b04b6c073ad4ddd4663c03b – before 8ea8ef5e42173560ac510e92a1cc797ffeea8831ae6aa16fdc163afe6b04b6c073ad4ddd4663c03b – before dbff5f0bfb2416b8b55c105ddbcd4f885e98fadaae6aa16fdc163afe6b04b6c073ad4ddd4663c03b – before 7b4881da5b19f65709f5c18c1a4d8caa2e496461ae6aa16fdc163afe6b04b6c073ad4ddd4663c03b – before 66df065b3106964e667b37bf8f7e55ec69d0c1f6ae6aa16fdc163afe6b04b6c073ad4ddd4663c03b – before 31310e373f4c8c74e029d4326b283e757edabc0bae6aa16fdc163afe6b04b6c073ad4ddd4663c03b – before e60b613df8b6253def41215402f72986fee3fc8d |
| Linux | Linux | 3.7 |
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/eea46baf145150910ba134f75a67106ba2222c1b
- https://git.kernel.org/stable/c/1880a324af1c95940a7c954b6b937e86844a33bd
- https://git.kernel.org/stable/c/8ea8ef5e42173560ac510e92a1cc797ffeea8831
- https://git.kernel.org/stable/c/dbff5f0bfb2416b8b55c105ddbcd4f885e98fada
- https://git.kernel.org/stable/c/7b4881da5b19f65709f5c18c1a4d8caa2e496461
- https://git.kernel.org/stable/c/66df065b3106964e667b37bf8f7e55ec69d0c1f6
- https://git.kernel.org/stable/c/31310e373f4c8c74e029d4326b283e757edabc0b
- https://git.kernel.org/stable/c/e60b613df8b6253def41215402f72986fee3fc8d
- https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html