CVE-2026-23052 Overview
CVE-2026-23052 is a memory allocation vulnerability in the Linux kernel's ftrace subsystem. The flaw exists in the ftrace_process_locs() function where the pg_remaining calculation incorrectly assumes that ENTRIES_PER_PAGE multiplied by 2^order equals the actual capacity of the allocated page group. This integer division error causes memory over-allocation and triggers kernel warnings during system initialization.
Critical Impact
Systems running affected Linux kernel versions may experience kernel warnings, memory over-allocation issues, and potential system instability during ftrace initialization.
Affected Products
- Linux Kernel (ftrace subsystem)
Discovery Timeline
- 2026-02-04 - CVE-2026-23052 published to NVD
- 2026-02-05 - Last updated in NVD database
Technical Details for CVE-2026-23052
Vulnerability Analysis
The vulnerability stems from improper integer arithmetic in the Linux kernel's ftrace memory allocation logic. The ENTRIES_PER_PAGE macro is calculated as PAGE_SIZE / ENTRY_SIZE using integer division. When PAGE_SIZE (typically 4096 bytes) is not evenly divisible by ENTRY_SIZE (24 bytes in this case), the calculation truncates the remainder.
For example, 4096 / 24 = 170 with a remainder of 16 bytes. During high-order allocations (such as 256 pages), the actual capacity significantly exceeds the calculated value of 256 * 170 entries. This discrepancy causes pg_remaining to be underestimated, which in turn makes the skip value (derived from skipped - pg_remaining) larger than expected.
The result triggers a WARN() condition at kernel/trace/ftrace.c:7295 when skip != remaining, producing kernel warnings during boot or module loading. A similar miscalculation in ftrace_allocate_records() can allocate excessive pages, triggering an additional warning at line 7276.
Root Cause
The root cause is the use of integer division without accounting for remainder bytes when calculating ftrace entry capacity. The ENTRIES_PER_PAGE constant does not accurately represent the true capacity of allocated page groups for high-order allocations, leading to systematic underestimation of available entries and subsequent memory over-allocation.
Attack Vector
This is a local kernel vulnerability triggered during ftrace initialization. While the attack vector details are not explicitly documented, the issue manifests during kernel boot or when ftrace-related kernel modules are loaded. The vulnerability primarily results in kernel warnings and potential memory inefficiency rather than direct exploitation for code execution.
The vulnerability triggers specific kernel warnings:
Extra allocated pages for ftrace: 2 with 654 skipped
WARNING: CPU: 0 PID: 0 at kernel/trace/ftrace.c:7295 ftrace_process_locs+0x5bf/0x5e0
Extra allocated pages for ftrace
WARNING: CPU: 0 PID: 0 at kernel/trace/ftrace.c:7276 ftrace_process_locs+0x548/0x580
Detection Methods for CVE-2026-23052
Indicators of Compromise
- Kernel warning messages containing ftrace_process_locs in system logs
- Warning messages referencing kernel/trace/ftrace.c:7295 or kernel/trace/ftrace.c:7276
- Log entries containing "Extra allocated pages for ftrace" followed by skipped entry counts
- Unexpected memory allocation patterns during kernel initialization
Detection Strategies
- Monitor kernel logs (dmesg) for ftrace-related WARNING messages
- Implement automated log analysis to detect ftrace_process_locs warnings
- Review system boot logs for memory allocation anomalies in the tracing subsystem
- Deploy kernel integrity monitoring solutions to track ftrace subsystem behavior
Monitoring Recommendations
- Configure centralized logging to capture kernel warning messages across all Linux systems
- Set up alerts for kernel WARNING messages containing ftrace-related function names
- Monitor system memory utilization during boot and module loading phases
- Establish baseline behavior for ftrace initialization to detect anomalies
How to Mitigate CVE-2026-23052
Immediate Actions Required
- Review kernel git commits for patch details
- Apply the latest stable kernel updates that include the ftrace memory allocation fix
- Monitor systems for kernel warnings until patches can be applied
- Prioritize patching systems where ftrace functionality is actively used
Patch Information
The fix modifies the ftrace memory allocation logic to use the actual capacity of a page group rather than the calculated ENTRIES_PER_PAGE constant. The patch updates ftrace_allocate_pages() to return the number of allocated pages directly, eliminating the need for separate capacity calculations. The ENTRIES_PER_PAGE definition is removed as it is no longer needed.
Official patches are available through the kernel git repository:
Workarounds
- Update to a patched kernel version as the primary mitigation
- For systems where immediate patching is not possible, monitor kernel logs for warning messages
- Consider disabling ftrace functionality if not required for production workloads
- Implement compensating controls through enhanced system monitoring
# Check current kernel version
uname -r
# Check for ftrace-related warnings in kernel logs
dmesg | grep -i ftrace
# Monitor for specific warning patterns
dmesg | grep "ftrace_process_locs"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


