CVE-2024-38588

Updated: 2026-02-27 03:50:59.950227

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().


Links NIST CIRCL RHEL Ubuntu

Severity

Severity Score
CVSS Version 2.x 0.0
CVSS Version 3.x HIGH 7.8

Status

OS name Project name Version Score Severity Status Errata Last updated

Statement

AlmaLinux 9.2 ESU kernel 5.14.0 7.8 HIGH Released CLSA-2025:1743193221 2024-10-21 17:30:36
CentOS 7 ELS kernel 3.10.0 7.8 HIGH Ignored 2024-10-03 15:23:44 This affects ftrace internals during module unload, and is only relevant in debugging or probe setup...
CentOS 8.4 ELS kernel 4.18.0 7.8 HIGH Released CLSA-2024:1729869774 2024-10-25 14:33:07
CentOS 8.5 ELS kernel 4.18.0 7.8 HIGH Released CLSA-2024:1729870301 2024-10-25 14:33:08
CentOS Stream 8 ELS kernel 4.18.0 7.8 HIGH Released CLSA-2024:1729874131 2024-10-25 14:33:06
CloudLinux 7 ELS kernel 3.10.0 7.8 HIGH Ignored 2025-01-10 22:43:35 This affects ftrace internals during module unload, and is only relevant in debugging or probe setup...
Oracle Linux 7 ELS kernel 3.10.0 7.8 HIGH Ignored 2025-05-12 04:24:58 This affects ftrace internals during module unload, and is only relevant in debugging or probe setup...
Oracle Linux 7 ELS kernel-uek 5.4.17 7.8 HIGH Already Fixed 2026-02-04 01:39:50 This affects ftrace internals during module unload, and is only relevant in debugging or probe setup...
RHEL 7 ELS kernel 3.10.0 7.8 HIGH Ignored 2025-06-18 03:55:59 This affects ftrace internals during module unload, and is only relevant in debugging or probe setup...
Ubuntu 16.04 ELS linux-hwe 4.15.0 7.8 HIGH Released CLSA-2024:1728584752 2024-10-10 14:29:06
Total: 12