Linux Kernel Use-After-Free Vulnerability in Ftrace Operations

Vulnerability

A use-after-free vulnerability has been identified in the Linux kernel's ftrace functionality. This issue arises when dynamic ftrace operations are registered and unregistered in a way that creates a race condition. Specifically, the vulnerability occurs when the 'ftrace_ops_list_func' callback is used, leading to a potential access violation if ftrace is activated while the operations are being manipulated. The issue was reported by KASAN (Kernel Address Sanitizer) as a use-after-free error, indicating that memory was freed while still being accessed by another part of the system.

Impact

Exploitation of this vulnerability can lead to a use-after-free condition, where freed memory is accessed, potentially causing memory corruption or allowing for arbitrary code execution.

Reproduction

The vulnerability can be reproduced by registering two dynamic ftrace operations with the same content successively. After unregistering the second operation, the use-after-free condition is triggered, as the first operation is still active but has been improperly synchronized, allowing another CPU to access the freed memory.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
5.7
remediation
0.0
relevance
0.0
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.